refac
This commit is contained in:
1 parent
d0f759ce40
commit
858e9236df
1 file changed
+4
-1
@@ -960,6 +960,9 @@ async def get_event_emitter(request_info, update_db=True):
|
||||
if internal and event_data.get('type') == 'notification':
|
||||
return
|
||||
|
||||
room = f'user:{user_id}'
|
||||
# Local rooms are authoritative; Redis may have listeners on another instance.
|
||||
if WEBSOCKET_MANAGER == 'redis' or room in sio.manager.rooms.get('/', {}):
|
||||
await sio.emit(
|
||||
'events',
|
||||
{
|
||||
@@ -968,7 +971,7 @@ async def get_event_emitter(request_info, update_db=True):
|
||||
**({'internal': True} if internal else {}),
|
||||
'data': event_data,
|
||||
},
|
||||
room=f'user:{user_id}',
|
||||
room=room,
|
||||
)
|
||||
|
||||
if update_db and message_id and not (request_info.get('chat_id') or '').startswith('local:'):
|
||||
|
||||
Reference in new issue
Block a user