From df5fc0c14fcaa6a92db8eb1d2842446209826bd7 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Fri, 16 Oct 2026 12:16:03 +0200 Subject: [PATCH] fix: someone removed from a group keeps a chat shared with that group open (#32535) When an admin took someone out of a group, a chat shared with that group with "Allow replies" stayed open on that person's screen, message box included. Changing a group drops that person's live connection, and when it came back the chat was only checked again if the server let them back in, so a refused rejoin left the page as it was. Now the chat is checked again after every answer, so someone who lost access is sent to the home page. Fixes #32527 --- src/lib/components/chat/Chat.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 224c92e777..f3fadb6c16 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1464,8 +1464,9 @@ if (next && socket) socket.emit('events:chat', { chat_id: next, data: { type: 'join' } }, (accepted: boolean) => { if (!socket.connected || socket.id !== connectionId || $chatId !== next) return; - if (accepted) void refreshChat(); - else clearPresence(); + if (!accepted) clearPresence(); + // A refused join can mean access was lost; the refresh then sends the reader home. + void refreshChat(); }); }; $: syncChatRoom($socket, $chatId, $temporaryChatEnabled);