From f509f5542dde384d34402f6df763f49a06bea109 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 16 Dec 2025 13:51:39 -0500 Subject: [PATCH] refac: channel name --- src/lib/components/layout/Sidebar/ChannelModal.svelte | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/components/layout/Sidebar/ChannelModal.svelte b/src/lib/components/layout/Sidebar/ChannelModal.svelte index 5925d002d..b12398911 100644 --- a/src/lib/components/layout/Sidebar/ChannelModal.svelte +++ b/src/lib/components/layout/Sidebar/ChannelModal.svelte @@ -55,6 +55,12 @@ const submitHandler = async () => { loading = true; + if (name.length > 128) { + toast.error($i18n.t('Channel name must be less than 128 characters')); + loading = false; + return; + } + await onSubmit({ type: type, name: name.replace(/\s/g, '-'), @@ -210,6 +216,7 @@ placeholder={`${$i18n.t('new-channel')}`} autocomplete="off" required={type !== 'dm'} + max="100" />