From ed3cf8355346689d790829074aa7d8cd004b7865 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Thu, 22 Oct 2026 01:32:51 +0200 Subject: [PATCH] refac: recheck live chat access after archiving and bulk unsharing (#32887) Archiving a chat, archiving all chats and unsharing all chats now run the same live access recheck as the other chat changes. --- backend/open_webui/events.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/events.py b/backend/open_webui/events.py index 829fa612bd..825e2a2304 100644 --- a/backend/open_webui/events.py +++ b/backend/open_webui/events.py @@ -1136,8 +1136,11 @@ class SocketSessionEventSink: EVENTS.CHAT_UNSHARED.name, EVENTS.CHAT_FOLDER_UPDATED.name, EVENTS.CHAT_DELETED.name, + EVENTS.CHAT_ARCHIVED.name, }: - await refresh_chat_access((event.subject or {}).get('id')) + subject = event.subject or {} + # User-scoped events (archive all, unshare all) recheck every chat. + await refresh_chat_access(subject.get('id') if subject.get('type') == 'chat' else None) if event.event not in {EVENTS.USER_DELETED.name, EVENTS.USER_ROLE_UPDATED.name}: return