From 3f14cbd6c143b3ea14c4fa9b1eba82f5a5773d6a Mon Sep 17 00:00:00 2001 From: CakeCN Date: Fri, 9 Jan 2026 11:16:30 +0800 Subject: [PATCH] some log --- Html/apps/sockets/namespaces.py | 2 +- Html/apps/static/js/chatbox.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Html/apps/sockets/namespaces.py b/Html/apps/sockets/namespaces.py index a1c9b0c..48dd91a 100644 --- a/Html/apps/sockets/namespaces.py +++ b/Html/apps/sockets/namespaces.py @@ -122,7 +122,7 @@ class AgentNamespace(Namespace): user_id = uuid2username[user_uuid] session['user_uuid'] = user_uuid print(f'User connected with session user_uuid: {user_uuid}') - join_room(user_uuid, namespace='/agent') + join_room(user_uuid) user_uuid2chatmanager = ex["user_uuid2chatmanager"] user_uuid2ase_client = ex["user_uuid2ase_client"] diff --git a/Html/apps/static/js/chatbox.js b/Html/apps/static/js/chatbox.js index 8af54cc..7027d82 100644 --- a/Html/apps/static/js/chatbox.js +++ b/Html/apps/static/js/chatbox.js @@ -81,6 +81,7 @@ document.addEventListener('DOMContentLoaded', function () { // 初始化聊天消息管理器 chatManager = new ChatMessageManager(); socket.on('connect', function () { + console.log('Connected to WebSocket server'+socket.id+"with user"+JSON.stringify(user_data)); socket.emit('login',JSON.stringify(user_data)); }); socket.on('open-iframe', function() {