diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 7f80bca601..c2ebe59bea 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -902,8 +902,15 @@ const initNewChat = async () => { console.log('initNewChat'); - if ($user?.role !== 'admin' && $user?.permissions?.chat?.temporary_enforced) { - await temporaryChatEnabled.set(true); + if ($user?.role !== 'admin') { + if ($user?.permissions?.chat?.temporary_enforced) { + await temporaryChatEnabled.set(true); + } + + if (!$user?.permissions?.chat?.temporary) { + await temporaryChatEnabled.set(false); + return; + } } if ($settings?.temporaryChatByDefault ?? false) { diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte index b905e09b11..14b84aab58 100644 --- a/src/lib/components/chat/Settings/Interface.svelte +++ b/src/lib/components/chat/Settings/Interface.svelte @@ -713,24 +713,26 @@ -