mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-27 09:46:07 -04:00
refac: sync channel room on member removal (#30446)
Removing members from a group or DM channel now also removes their sessions from the channel room, matching how access grant changes are handled.
This commit is contained in:
@@ -688,6 +688,8 @@ async def remove_members_by_id(
|
||||
|
||||
try:
|
||||
deleted = await Channels.remove_members_from_channel(channel.id, form_data.user_ids, db=db)
|
||||
if channel.type in ['group', 'dm']:
|
||||
await leave_room_for_users(f'channel:{channel.id}', form_data.user_ids)
|
||||
|
||||
await publish_event(
|
||||
request,
|
||||
|
||||
Reference in New Issue
Block a user