forked from coracle/flotilla
Raise message size limit in chat (#186)
Co-authored-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com> Co-committed-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
This commit is contained in:
@@ -8,16 +8,22 @@
|
|||||||
import {getRoomItemPath} from "@app/util/routes"
|
import {getRoomItemPath} from "@app/util/routes"
|
||||||
|
|
||||||
const props: ComponentProps<typeof NoteContent> = $props()
|
const props: ComponentProps<typeof NoteContent> = $props()
|
||||||
|
const MESSAGE_MIN_LENGTH = 5000
|
||||||
|
const MESSAGE_MAX_LENGTH = 5500
|
||||||
|
|
||||||
const path = getRoomItemPath(props.url!, props.event)
|
const path = getRoomItemPath(props.url!, props.event)
|
||||||
|
const minLength =
|
||||||
|
props.minLength ?? (props.event.kind === MESSAGE ? MESSAGE_MIN_LENGTH : undefined)
|
||||||
|
const maxLength =
|
||||||
|
props.maxLength ?? (props.event.kind === MESSAGE ? MESSAGE_MAX_LENGTH : undefined)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={cx("text-sm", {"card2 card2-sm bg-alt": props.event.kind !== MESSAGE})}>
|
<div class={cx("text-sm", {"card2 card2-sm bg-alt": props.event.kind !== MESSAGE})}>
|
||||||
{#if path && !isMobile}
|
{#if path && !isMobile}
|
||||||
<Link href={path}>
|
<Link href={path}>
|
||||||
<NoteContent {...props} />
|
<NoteContent {...props} {minLength} {maxLength} />
|
||||||
</Link>
|
</Link>
|
||||||
{:else}
|
{:else}
|
||||||
<NoteContent {...props} />
|
<NoteContent {...props} {minLength} {maxLength} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user