mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-28 06:22:33 +00:00
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.
This commit is contained in:
parent
a9adb2b78e
commit
ed3cf83553
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue