Timothy Jaeryang Baek 4 月之前
父节点
当前提交
16504b88f5
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      backend/open_webui/socket/main.py

+ 3 - 1
backend/open_webui/socket/main.py

@@ -218,7 +218,9 @@ async def disconnect(sid):
 def get_event_emitter(request_info):
     async def __event_emitter__(event_data):
         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:
             await sio.emit(