This commit is contained in:
Timothy Jaeryang Baek 2024-12-19 13:11:44 -08:00
parent 71d4ed1f6a
commit 16504b88f5

View File

@ -218,7 +218,9 @@ async def disconnect(sid):
def get_event_emitter(request_info): def get_event_emitter(request_info):
async def __event_emitter__(event_data): async def __event_emitter__(event_data):
user_id = request_info["user_id"] user_id = request_info["user_id"]
session_ids = USER_POOL.get(user_id, []) session_ids = list(
set(USER_POOL.get(user_id, []) + [request_info["session_id"]])
)
for session_id in session_ids: for session_id in session_ids:
await sio.emit( await sio.emit(