{ deleteMessageHandler(); }} />
{#if !($settings?.chatBubble ?? true)}
{/if}
{#if !($settings?.chatBubble ?? true)}
{#if message.user} {$i18n.t("You")} {message?.user ?? ""} {:else if $settings.showUsername || $_user?.name !== user?.name} {user?.name ?? $i18n.t("You")} {:else} {$i18n.t("You")} {/if} {#if message.timestamp}
{$i18n.t( formatDate(message.timestamp * 1000), { LOCALIZED_TIME: dayjs( message.timestamp * 1000, ).format("LT"), LOCALIZED_DATE: dayjs( message.timestamp * 1000, ).format("L"), }, )}
{/if}
{:else if message.timestamp}
{$i18n.t(formatDate(message.timestamp * 1000), { LOCALIZED_TIME: dayjs( message.timestamp * 1000, ).format("LT"), LOCALIZED_DATE: dayjs( message.timestamp * 1000, ).format("L"), })}
{/if}
{#if edit !== true} {#if message.files}
{#each message.files as file} {@const fileUrl = file.url?.startsWith("data") || file.url?.startsWith("http") ? file.url : `${REXPRO_API_BASE_URL}/files/${file.url}${file?.content_type ? "/content" : ""}`}
{#if file.type === "image" || (file?.content_type ?? "").startsWith("image/")} {:else} {/if}
{/each}
{/if} {/if} {#if edit === true}
{#if (editedFiles ?? []).length > 0}
{#each editedFiles as file, fileIdx} {#if file.type === "image" || (file?.content_type ?? "").startsWith("image/")} {@const fileUrl = file.url?.startsWith("data") || file.url?.startsWith("http") ? file.url : `${REXPRO_API_BASE_URL}/files/${file.url}${file?.content_type ? "/content" : ""}`}
input
{:else} { editedFiles.splice(fileIdx, 1); editedFiles = editedFiles; }} on:click={() => { console.log(file); }} /> {/if} {/each}
{/if}