🔌 连接到MongoDB服务器... ✅ MongoDB连接成功 WebSocket服务器启动在 188.68.250.202:22809 WebSocket连接地址: ws://188.68.250.202:22809 🚀 所有服务已启动 HTTP服务器启动在 188.68.250.202:16894 健康检查: http://188.68.250.202:16894/health 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDUxMDQwMn0=' } 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的离线消息 📨 找到 1 条离线消息 for 用户 3 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDUxMDQwMn0=' } 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的离线消息 📨 找到 1 条离线消息 for 用户 3 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 3 的所有离线消息 ✅ 已删除 1 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 0 条离线消息 for 用户 2 用户 2 断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754433887421_cuhj1cea5', conversationId: 'c2c_2_3', to: '2', text: '你在干什么?' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 你在干什么? 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '你在干什么?', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T22:44:48.629Z, timestamp: 1754433888629 } ✅ 离线消息已存储到MongoDB,ID: 68928960852463d066c5337f ✅ 离线消息已存储,消息ID: 68928960852463d066c5337f 收到消息: { type: 'send_message', messageId: 'msg_1754433895517_1utaipdow', conversationId: 'c2c_2_3', to: '2', text: '?' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: ? 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '?', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T22:44:56.695Z, timestamp: 1754433896695 } ✅ 离线消息已存储到MongoDB,ID: 68928968852463d066c53380 ✅ 离线消息已存储,消息ID: 68928968852463d066c53380 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 2 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 2 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 0 条离线消息 for 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754434020085_my2tr1ws3', conversationId: 'c2c_1_2', to: '1', text: '哈哈' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: 哈哈 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '哈哈', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-05T22:47:00.903Z, timestamp: 1754434020903 } ✅ 离线消息已存储到MongoDB,ID: 689289e4852463d066c53381 ✅ 离线消息已存储,消息ID: 689289e4852463d066c53381 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754434029357_dpv8tbm1l', conversationId: 'c2c_2_3', to: '2', text: '好' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_4' } 🗑️ 删除用户 2 在会话 c2c_2_4 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_4' } 用户 2 加入会话 c2c_2_4 收到消息: { type: 'send_message', messageId: 'msg_1754434045575_iyvhfiwln', conversationId: 'c2c_2_4', to: '4', text: '?' } 📴 用户 4 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 4: ? 📦 MongoDB文档: { target_user_id: 4, conversation_id: 'c2c_2_4', message_content: '?', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-05T22:47:26.367Z, timestamp: 1754434046367 } ✅ 离线消息已存储到MongoDB,ID: 689289fe852463d066c53382 ✅ 离线消息已存储,消息ID: 689289fe852463d066c53382 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_4' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754434054557_hjzjmeplb', conversationId: 'c2c_2_3', to: '2', text: '不错0' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 0 条离线消息 for 用户 2 用户 2 断开连接 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754434086451_l9p54fmj3', conversationId: 'c2c_2_3', to: '2', text: '好好好' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 好好好 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '好好好', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T22:48:07.371Z, timestamp: 1754434087371 } ✅ 离线消息已存储到MongoDB,ID: 68928a27852463d066c53383 ✅ 离线消息已存储,消息ID: 68928a27852463d066c53383 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 1 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 1 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 0 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754434238356_kjs7s26pu', conversationId: 'c2c_2_3', to: '3', text: '??' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754434257918_owqyrhbm0', conversationId: 'c2c_2_3', to: '2', text: '干啥呢' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 干啥呢 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '干啥呢', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T22:50:58.944Z, timestamp: 1754434258944 } ✅ 离线消息已存储到MongoDB,ID: 68928ad2852463d066c53384 ✅ 离线消息已存储,消息ID: 68928ad2852463d066c53384 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 1 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 1 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 0 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754434388476_p651eezpk', conversationId: 'c2c_2_3', to: '3', text: 'Tools to interact with buzzheavier.com programmatically\n' + 'File Upload Using CURL\n' + 'Anonymous file upload\n' + 'curl -#o - -T "sample.mp4" "https://w.buzzheavier.com/sample.mp4" | cat\n' + 'Upload a file into user directory\n' + 'curl -#o - -T -H "Authorization: Bearer YOUR_ACCOUNT_ID" "sample.mp4" "https://w.buzzheavier.com/{parentId}/sample.mp4" | cat\n' + 'Upload a file to a specific location\n' + 'curl -#o - -T "sample.mp4" "https://w.buzzheavier.com/sample.mp4?locationId={locationId}" | cat\n' + 'Upload a file with note\n' + 'curl -#o - -T "sample.mp4" "https://w.buzzheavier.com/sample.mp4?note=$(echo -n "your_note_text" | base64)" | cat\n' + 'API Reference\n' + 'Authorization Header:Authorization: Bearer YOUR_ACCOUNT_ID\n' + 'File Upload\n' + 'Anonymous file upload\n' + 'Method: PUT\n' + 'Endpoint: https://w.buzzheavier.com/{name}\n' + 'Param name: file name - required, max 500 chars\n' + 'Description: Uploads a file to default location\n' + 'Upload a file into user directory\n' + 'Method: PUT\n' + 'Endpoint: https://w.buzzheavier.com/{parentId}/{name}\n' + 'Param name: file name - required, max 500 chars\n' + 'Param parentId: id of directory where file will be uploaded\n' + 'Description: Upload file into user directory\n' + 'Upload a file to specific location\n' + 'Method: PUT\n' + 'Endpoint: https://w.buzzheavier.com/{name}?locationId={locationId}\n' + 'Param name: file name - required, max 500 chars\n' + 'Param locationId: location where file will be stored - optional\n' + 'Description: Uploads a file to a specific storage location\n' + 'Upload a file with note\n' + 'Method: PUT\n' + 'Endpoint: https://w.buzzheavier.com/{name}?note={base64(note)}\n' + 'Param name: file name - required, max 500 chars\n' + 'Param note: base64 encoded text which will be shown under download link - optional, max 500 chars\n' + 'Description: Uploads a file with note\n' + 'Public APIs\n' + 'Get file storage locations\n' + 'Method: GET\n' + 'Endpoint:https://buzzheavier.com/api/locations\n' + 'Description: Retrieves file storage locations available to you.\n' + 'Account\n' + 'Get account information\n' + 'Method: GET\n' + 'Endpoint: https://buzzheavier.com/api/account\n' + "Description: Retrieves the current authenticated account's information.\n" + 'File Manager\n' + 'Get root directory\n' + 'Method: GET\n' + 'Endpoint: https://buzzheavier.com/api/fs\n' + 'Description: Retrieves the contents of the root directory.\n' + 'Get directory\n' + 'Method: GET\n' + 'Endpoint: https://buzzheavier.com/api/fs/{directoryId}\n' + 'Description: Retrieve the contents of the specified directory.\n' + 'Create directory\n' + 'Method: POST\n' + 'Endpoint: https://buzzheavier.com/api/fs/{parentDirectoryId}\n' + 'Description: Create a new directory under parent directory. (To create directory under root directory, first you will need to get directoryId using "Get root directory" call.)\n' + '{\n' + ' "name": "string", // Name of the new directory\n' + '}\n' + 'Rename directory\n' + 'Method: PATCH\n' + 'Endpoint: https://buzzheavier.com/api/fs/{directoryId}\n' + 'Description: Renames the specified directory.\n' + '{\n' + ' "name": "string" // New name for the directory\n' + '}\n' + 'Move directory\n' + 'Method: PUT\n' + 'Endpoint: https://buzzheavier.com/api/fs/{directoryId}\n' + 'Description: Moves the specified directory to a new parent directory.\n' + '{\n' + ' "parentId": "string", // DirectoryId where you want to move give directory\n' + '}\n' + 'Rename File\n' + 'Method: PATCH\n' + 'Endpoint: https://buzzheavier.com/api/fs/{fileId}\n' + 'Description: Renames the specified file.\n' + '{\n' + ' "name": "string" // New name for the file\n' + '}\n' + 'Move file\n' + 'Method: PUT\n' + 'Endpoint: https://buzzheavier.com/api/fs/{fileId}\n' + 'Description: Moves the specified file to a new parent directory.\n' + '{\n' + ' "parentId": "string", // DirectoryId where you want to move give directory\n' + '}\n' + 'Add note to file\n' + 'Method: PUT\n' + 'Endpoint: https://buzzheavier.com/api/fs/{fileId}\n' + 'Description: Adds / changes to note of file.\n' + '{\n' + ' "note": "string", // Note you want to add to file\n' + '}\n' + 'Delete directory\n' + 'Method: DELETE\n' + 'Endpoint: https://buzzheavier.com/api/fs/{directoryId}\n' + "Description: Deletes the specified directory and it's subdirectories." } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 0 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754434561740_vcausfqbh', conversationId: 'c2c_2_3', to: '3', text: '你是?' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 0 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754434584412_o3cntvwnt', conversationId: 'c2c_2_3', to: '3', text: '你是?' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'send_message', messageId: 'msg_1754434591021_rsd1wtfmk', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754434598803_bvenee5np', conversationId: 'c2c_2_3', to: '2', text: '好好好' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 好好好 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '好好好', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T22:56:39.377Z, timestamp: 1754434599377 } ✅ 离线消息已存储到MongoDB,ID: 68928c27852463d066c53385 ✅ 离线消息已存储,消息ID: 68928c27852463d066c53385 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 1 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 1 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'heartbeat' } 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDUxMDQwMn0=' } 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的离线消息 📨 找到 0 条离线消息 for 用户 3 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 0 条离线消息 for 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754434778086_3fpilqtpo', conversationId: 'c2c_2_3', to: '2', text: '干啥呢' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 用户 2 断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754434787593_82dvb15xz', conversationId: 'c2c_2_3', to: '2', text: '想你了' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 想你了 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '想你了', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T22:59:48.046Z, timestamp: 1754434788046 } ✅ 离线消息已存储到MongoDB,ID: 68928ce4852463d066c53386 ✅ 离线消息已存储,消息ID: 68928ce4852463d066c53386 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 1 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 1 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754435075895_0a6vuj91k', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 哈哈 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '哈哈', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T23:04:36.345Z, timestamp: 1754435076345 } ✅ 离线消息已存储到MongoDB,ID: 68928e04852463d066c53387 ✅ 离线消息已存储,消息ID: 68928e04852463d066c53387 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 1 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 1 条离线消息 收到消息: { type: 'send_message', messageId: 'msg_1754435088463_1q9s9yk35', conversationId: 'c2c_2_3', to: '2', text: '干啥呢' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 用户 2 断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754435095965_4ldqod48q', conversationId: 'c2c_2_3', to: '2', text: '我爱你' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 我爱你 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '我爱你', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T23:04:56.426Z, timestamp: 1754435096426 } ✅ 离线消息已存储到MongoDB,ID: 68928e18852463d066c53388 ✅ 离线消息已存储,消息ID: 68928e18852463d066c53388 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 1 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 1 条离线消息 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754435144295_gfxi2wuhx', conversationId: 'c2c_2_3', to: '2', text: '想你了' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 想你了 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '想你了', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T23:05:44.771Z, timestamp: 1754435144771 } ✅ 离线消息已存储到MongoDB,ID: 68928e48852463d066c53389 ✅ 离线消息已存储,消息ID: 68928e48852463d066c53389 收到消息: { type: 'send_message', messageId: 'msg_1754435148346_jz7205hzr', conversationId: 'c2c_2_3', to: '2', text: '好好好' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 好好好 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '好好好', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T23:05:48.805Z, timestamp: 1754435148805 } ✅ 离线消息已存储到MongoDB,ID: 68928e4c852463d066c5338a ✅ 离线消息已存储,消息ID: 68928e4c852463d066c5338a 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 2 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 2 条离线消息 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'send_message', messageId: 'msg_1754435432710_goybbwdw7', conversationId: 'c2c_2_3', to: '2', text: '哇塞' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 收到消息: { type: 'send_message', messageId: 'msg_1754435442215_3atkyko9s', conversationId: 'c2c_2_3', to: '2', text: '好好' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 用户 2 断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754435450508_byrccs7op', conversationId: 'c2c_2_3', to: '2', text: '不错啊' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 不错啊 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '不错啊', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T23:10:50.999Z, timestamp: 1754435450999 } ✅ 离线消息已存储到MongoDB,ID: 68928f7a852463d066c5338b ✅ 离线消息已存储,消息ID: 68928f7a852463d066c5338b 收到消息: { type: 'send_message', messageId: 'msg_1754435454181_5fme9so1b', conversationId: 'c2c_2_3', to: '2', text: '干啥呢' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 干啥呢 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '干啥呢', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-05T23:10:54.655Z, timestamp: 1754435454655 } ✅ 离线消息已存储到MongoDB,ID: 68928f7e852463d066c5338c ✅ 离线消息已存储,消息ID: 68928f7e852463d066c5338c 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 2 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 2 条离线消息 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754435651820_ivw3riuo9', conversationId: 'c2c_2_3', to: '3', text: 'Tools to interact with buzzheavier.com programmatically\n' + 'File Upload Using CURL\n' + 'Anonymous file upload\n' + 'curl -#o - -T "sample.mp4" "https://w.buzzheavier.com/sample.mp4" | cat\n' + 'Upload a file into user directory\n' + 'curl -#o - -T -H "Authorization: Bearer YOUR_ACCOUNT_ID" "sample.mp4" "https://w.buzzheavier.com/{parentId}/sample.mp4" | cat\n' + 'Upload a file to a specific location\n' + 'curl -#o - -T "sample.mp4" "https://w.buzzheavier.com/sample.mp4?locationId={locationId}" | cat\n' + 'Upload a file with note\n' + 'curl -#o - -T "sample.mp4" "https://w.buzzheavier.com/sample.mp4?note=$(echo -n "your_note_text" | base64)" | cat\n' + 'API Reference\n' + 'Authorization Header:Authorization: Bearer YOUR_ACCOUNT_ID\n' + 'File Upload\n' + 'Anonymous file upload\n' + 'Method: PUT\n' + 'Endpoint: https://w.buzzheavier.com/{name}\n' + 'Param name: file name - required, max 500 chars\n' + 'Description: Uploads a file to default location\n' + 'Upload a file into user directory\n' + 'Method: PUT\n' + 'Endpoint: https://w.buzzheavier.com/{parentId}/{name}\n' + 'Param name: file name - required, max 500 chars\n' + 'Param parentId: id of directory where file will be uploaded\n' + 'Description: Upload file into user directory\n' + 'Upload a file to specific location\n' + 'Method: PUT\n' + 'Endpoint: https://w.buzzheavier.com/{name}?locationId={locationId}\n' + 'Param name: file name - required, max 500 chars\n' + 'Param locationId: location where file will be stored - optional\n' + 'Description: Uploads a file to a specific storage location\n' + 'Upload a file with note\n' + 'Method: PUT\n' + 'Endpoint: https://w.buzzheavier.com/{name}?note={base64(note)}\n' + 'Param name: file name - required, max 500 chars\n' + 'Param note: base64 encoded text which will be shown under download link - optional, max 500 chars\n' + 'Description: Uploads a file with note\n' + 'Public APIs\n' + 'Get file storage locations\n' + 'Method: GET\n' + 'Endpoint:https://buzzheavier.com/api/locations\n' + 'Description: Retrieves file storage locations available to you.\n' + 'Account\n' + 'Get account information\n' + 'Method: GET\n' + 'Endpoint: https://buzzheavier.com/api/account\n' + "Description: Retrieves the current authenticated account's information.\n" + 'File Manager\n' + 'Get root directory\n' + 'Method: GET\n' + 'Endpoint: https://buzzheavier.com/api/fs\n' + 'Description: Retrieves the contents of the root directory.\n' + 'Get directory\n' + 'Method: GET\n' + 'Endpoint: https://buzzheavier.com/api/fs/{directoryId}\n' + 'Description: Retrieve the contents of the specified directory.\n' + 'Create directory\n' + 'Method: POST\n' + 'Endpoint: https://buzzheavier.com/api/fs/{parentDirectoryId}\n' + 'Description: Create a new directory under parent directory. (To create directory under root directory, first you will need to get directoryId using "Get root directory" call.)\n' + '{\n' + ' "name": "string", // Name of the new directory\n' + '}\n' + 'Rename directory\n' + 'Method: PATCH\n' + 'Endpoint: https://buzzheavier.com/api/fs/{directoryId}\n' + 'Description: Renames the specified directory.\n' + '{\n' + ' "name": "string" // New name for the directory\n' + '}\n' + 'Move directory\n' + 'Method: PUT\n' + 'Endpoint: https://buzzheavier.com/api/fs/{directoryId}\n' + 'Description: Moves the specified directory to a new parent directory.\n' + '{\n' + ' "parentId": "string", // DirectoryId where you want to move give directory\n' + '}\n' + 'Rename File\n' + 'Method: PATCH\n' + 'Endpoint: https://buzzheavier.com/api/fs/{fileId}\n' + 'Description: Renames the specified file.\n' + '{\n' + ' "name": "string" // New name for the file\n' + '}\n' + 'Move file\n' + 'Method: PUT\n' + 'Endpoint: https://buzzheavier.com/api/fs/{fileId}\n' + 'Description: Moves the specified file to a new parent directory.\n' + '{\n' + ' "parentId": "string", // DirectoryId where you want to move give directory\n' + '}\n' + 'Add note to file\n' + 'Method: PUT\n' + 'Endpoint: https://buzzheavier.com/api/fs/{fileId}\n' + 'Description: Adds / changes to note of file.\n' + '{\n' + ' "note": "string", // Note you want to add to file\n' + '}\n' + 'Delete directory\n' + 'Method: DELETE\n' + 'Endpoint: https://buzzheavier.com/api/fs/{directoryId}\n' + "Description: Deletes the specified directory and it's subdirectories." } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754435680158_bad67pjsw', conversationId: 'c2c_2_3', to: '3', text: 'ygyguio@mailfence.com' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754435689538_wui7pq412', conversationId: 'c2c_2_3', to: '3', text: '好' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754435697771_w5142ics3', conversationId: 'c2c_2_3', to: '3', text: 'ygyguio@mailfence.com' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDUxMDYxMX0=' } 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的离线消息 📨 找到 0 条离线消息 for 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754436605843_vscx4r3fw', conversationId: 'c2c_2_3', to: '3', text: ' 'Method not allowed']);\n" + ' exit;\n' + '}\n' + '\n' + '// 验证用户身份\n' + 'function authenticateUser() {\n' + ' $headers = getallheaders();\n' + " $token = isset($headers['Authorization']) ? $headers['Authorization'] : '';\n" + ' \n' + ' if (empty($token)) {\n' + ' http_response_code(401);\n' + " echo json_encode(['error' => '未提供认证令牌']);\n" + ' return false;\n' + ' }\n' + ' \n' + " $token = str_replace('Bearer ', '', $token);\n" + ' $payload = json_decode(base64_decode($token), true);\n' + ' \n' + " if (!$payload || $payload['exp'] < time()) {\n" + ' http_response_code(401);\n' + " echo json_encode(['error' => '令牌无效或已过期']);\n" + ' return false;\n' + ' }\n' + ' \n' + " return $payload['user_id'];" } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754436616778_unm7we5n6', conversationId: 'c2c_2_3', to: '3', text: '985609484@qq.com' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754436650350_we6p5ue8v', conversationId: 'c2c_2_3', to: '3', text: 'KNWVCKQ5I697QM5J28QN' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754437172549_hrslph3gx', conversationId: 'c2c_2_3', to: '2', text: '(。・㉨・。)ノ♡ 剪贴板君上线啦,复制的内容会自动保存在这里哦~(。・㉨・。)ノ♡ 剪贴板君上线啦,复制的内容会自动保存在这里哦~' } 💬 消息已实时发送给在会话中的用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754437898796_7hd39klg5', conversationId: 'c2c_2_3', to: '3', text: '好好好' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754437905106_iazx1rf7y', conversationId: 'c2c_2_3', to: '3', text: '你在干啥' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754438012875_8hirw18c9', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 💬 消息已实时发送给在会话中的用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754438020780_e5xu9x709', conversationId: 'c2c_2_3', to: '2', text: '好好好' } 💬 消息已实时发送给在会话中的用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754438027359_fouv0xg4q', conversationId: 'c2c_2_3', to: '2', text: '干啥呢' } 💬 消息已实时发送给在会话中的用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754438031955_jw2kdkg79', conversationId: 'c2c_2_3', to: '3', text: '好' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754438043105_bajap7v9z', conversationId: 'c2c_2_3', to: '3', text: '累了' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754438049758_ewrn9laju', conversationId: 'c2c_2_3', to: '2', text: '哦' } 💬 消息已实时发送给在会话中的用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754438059294_2tmk7j3tb', conversationId: 'c2c_2_3', to: '2', text: '?好' } 💬 消息已实时发送给在会话中的用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754438063170_olo3m90f0', conversationId: 'c2c_2_3', to: '3', text: '。' } 💬 消息已实时发送给在会话中的用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 🔌 连接到MongoDB服务器... ✅ MongoDB连接成功 WebSocket服务器启动在 188.68.250.202:22809 WebSocket连接地址: ws://188.68.250.202:22809 🚀 所有服务已启动 HTTP服务器启动在 188.68.250.202:16894 健康检查: http://188.68.250.202:16894/health 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDY2OTY0NX0=' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 🔌 连接到MongoDB服务器... ✅ MongoDB连接成功 WebSocket服务器启动在 188.68.250.202:22809 WebSocket连接地址: ws://188.68.250.202:22809 🚀 所有服务已启动 HTTP服务器启动在 188.68.250.202:16894 健康检查: http://188.68.250.202:16894/health 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30= 📝 解码后的字符串: {"user_id":"2","exp":1754759753} 📦 解析后的payload: { user_id: '2', exp: 1754759753 } ⏰ 当前时间戳: 1754670876.35 过期时间戳: 1754759753 ✅ token验证成功,返回结果: { userId: '2', exp: 1754759753 } 🔍 认证结果: { userId: '2', exp: 1754759753 } ✅ 用户 2 认证成功,存储连接信息 📤 已发送认证成功消息给用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754670535904_946n47epm', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: 哈哈 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '哈哈', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-08T16:34:41.822Z, timestamp: 1754670881822 } ✅ 离线消息已存储到MongoDB,ID: 68962721604ef1b0c9478159 ✅ 离线消息已存储,消息ID: 68962721604ef1b0c9478159 ⚠️ 离线用户 3 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDYyNDQxMn0=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDYyNDQxMn0= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDYyNDQxMn0= 📝 解码后的字符串: {"user_id":"3","exp":1754624412} 📦 解析后的payload: { user_id: '3', exp: 1754624412 } ⏰ 当前时间戳: 1754670896.085 过期时间戳: 1754624412 ⏰ token已过期 🔍 认证结果: null ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDYyNDQxMn0=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDYyNDQxMn0= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDYyNDQxMn0= 📝 解码后的字符串: {"user_id":"3","exp":1754624412} 📦 解析后的payload: { user_id: '3', exp: 1754624412 } ⏰ 当前时间戳: 1754670899.336 过期时间戳: 1754624412 ⏰ token已过期 🔍 认证结果: null ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDYyNDQxMn0=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDYyNDQxMn0= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDYyNDQxMn0= 📝 解码后的字符串: {"user_id":"3","exp":1754624412} 📦 解析后的payload: { user_id: '3', exp: 1754624412 } ⏰ 当前时间戳: 1754670902.52 过期时间戳: 1754624412 ⏰ token已过期 🔍 认证结果: null ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'send_message', messageId: 'msg_1754670927895_ebcei2bse', conversationId: 'c2c_2_3', to: '2', text: '干啥呢' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'send_message', messageId: 'msg_1754671113463_krky6gmed', conversationId: 'c2c_2_3', to: '2', text: '你是' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754671134409_0lj4z56d0', conversationId: 'c2c_2_3', to: '3', text: '?' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: ? 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '?', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-08T16:38:55.094Z, timestamp: 1754671135094 } ✅ 离线消息已存储到MongoDB,ID: 6896281f604ef1b0c947815a ✅ 离线消息已存储,消息ID: 6896281f604ef1b0c947815a ⚠️ 离线用户 3 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0= 📝 解码后的字符串: {"user_id":"3","exp":1754760040} 📦 解析后的payload: { user_id: '3', exp: 1754760040 } ⏰ 当前时间戳: 1754671163.837 过期时间戳: 1754760040 ✅ token验证成功,返回结果: { userId: '3', exp: 1754760040 } 🔍 认证结果: { userId: '3', exp: 1754760040 } ✅ 用户 3 认证成功,存储连接信息 📤 已发送认证成功消息给用户 3 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 6 条离线消息 for 用户 3 - 聊天消息: 5 条 - 推送消息: 1 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 6 条离线消息 for 用户 3 - 聊天消息: 5 条 - 推送消息: 1 条 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 3 的所有离线消息 ✅ 已删除 6 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754671113463_krky6gmed', conversationId: 'c2c_2_3', to: '2', text: '你是' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 2 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'send_message', messageId: 'msg_1754671197399_6fjyqbvcb', conversationId: 'c2c_2_3', to: '2', text: '?' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 2 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754671210266_lp3qz5lu9', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 3 未注册极光推送RegistrationID,跳过推送 用户 3 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0= 📝 解码后的字符串: {"user_id":"3","exp":1754760040} 📦 解析后的payload: { user_id: '3', exp: 1754760040 } ⏰ 当前时间戳: 1754671709.038 过期时间戳: 1754760040 ✅ token验证成功,返回结果: { userId: '3', exp: 1754760040 } 🔍 认证结果: { userId: '3', exp: 1754760040 } ✅ 用户 3 认证成功,存储连接信息 📤 已发送认证成功消息给用户 3 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754671723518_w357zquuf', conversationId: 'c2c_2_3', to: '3', text: '好好好' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 3 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 未认证用户断开连接 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0= 📝 解码后的字符串: {"user_id":"3","exp":1754760040} 📦 解析后的payload: { user_id: '3', exp: 1754760040 } ⏰ 当前时间戳: 1754671867.236 过期时间戳: 1754760040 ✅ token验证成功,返回结果: { userId: '3', exp: 1754760040 } 🔍 认证结果: { userId: '3', exp: 1754760040 } ✅ 用户 3 认证成功,存储连接信息 📤 已发送认证成功消息给用户 3 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30= 📝 解码后的字符串: {"user_id":"2","exp":1754759753} 📦 解析后的payload: { user_id: '2', exp: 1754759753 } ⏰ 当前时间戳: 1754672090.06 过期时间戳: 1754759753 ✅ token验证成功,返回结果: { userId: '2', exp: 1754759753 } 🔍 认证结果: { userId: '2', exp: 1754759753 } ✅ 用户 2 认证成功,存储连接信息 📤 已发送认证成功消息给用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754672098925_z751u8c8c', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 2 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754672110265_h056869ud', conversationId: 'c2c_2_3', to: '2', text: '好' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 2 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30= 📝 解码后的字符串: {"user_id":"2","exp":1754759753} 📦 解析后的payload: { user_id: '2', exp: 1754759753 } ⏰ 当前时间戳: 1754672405.759 过期时间戳: 1754759753 ✅ token验证成功,返回结果: { userId: '2', exp: 1754759753 } 🔍 认证结果: { userId: '2', exp: 1754759753 } ✅ 用户 2 认证成功,存储连接信息 📤 已发送认证成功消息给用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754672420103_yhb5yexse', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 哈哈 ❌ 发送极光推送通知失败: Request failed with status code 400 ❌ 响应数据: { error: { code: 1003, message: "override_msg_id doesn't exist" } } ⚠️ 极光推送通知发送失败: Request failed with status code 400 收到消息: { type: 'send_message', messageId: 'msg_1754672428571_b7onzbbz6', conversationId: 'c2c_2_3', to: '2', text: '更' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 更 ❌ 发送极光推送通知失败: Request failed with status code 400 ❌ 响应数据: { error: { code: 1003, message: "override_msg_id doesn't exist" } } ⚠️ 极光推送通知发送失败: Request failed with status code 400 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30=' } 🔐 开始用户认证,token: eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30= 🔍 开始验证token: eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30= 📝 解码后的字符串: {"user_id":"2","exp":1754759753} 📦 解析后的payload: { user_id: '2', exp: 1754759753 } ⏰ 当前时间戳: 1754672694.28 过期时间戳: 1754759753 ✅ token验证成功,返回结果: { userId: '2', exp: 1754759753 } 🔍 认证结果: { userId: '2', exp: 1754759753 } ✅ 用户 2 认证成功,存储连接信息 📤 已发送认证成功消息给用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'send_message', messageId: 'msg_1754672697058_z6li2qr18', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 哈哈 ❌ 发送极光推送通知失败: Request failed with status code 400 ❌ 响应数据: { error: { code: 1003, message: "override_msg_id doesn't exist" } } ⚠️ 极光推送通知发送失败: Request failed with status code 400 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 🔌 连接到MongoDB服务器... ✅ MongoDB连接成功 WebSocket服务器启动在 188.68.250.202:22809 WebSocket连接地址: ws://188.68.250.202:22809 🚀 所有服务已启动 HTTP服务器启动在 188.68.250.202:16894 健康检查: http://188.68.250.202:16894/health 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30=' } ✅ 用户 2 认证成功 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754672870487_78000g5iu', conversationId: 'c2c_2_3', to: '2', text: '好' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754672870487_78000g5iu" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102451879837860' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754672893982_o7mn63n7e', conversationId: 'c2c_2_3', to: '2', text: '哈哈哈哈' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 哈哈哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "哈哈哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754672893982_o7mn63n7e" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102451879840009' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754673003133_5lvkotfdz', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 哈哈 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '哈哈', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-08T17:10:03.956Z, timestamp: 1754673003956 } ✅ 离线消息已存储到MongoDB,ID: 68962f6b63690977b52a4f6c ✅ 离线消息已存储,消息ID: 68962f6b63690977b52a4f6c 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754673003133_5lvkotfdz" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102451881641287' } 📲 极光推送通知已发送给离线用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754673032654_nc8p8y09r', conversationId: 'c2c_2_3', to: '2', text: '好好好' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 好好好 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '好好好', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-08T17:10:33.457Z, timestamp: 1754673033457 } ✅ 离线消息已存储到MongoDB,ID: 68962f8963690977b52a4f6d ✅ 离线消息已存储,消息ID: 68962f8963690977b52a4f6d 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 好好好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "好好好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754673032654_nc8p8y09r" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102451882240074' } 📲 极光推送通知已发送给离线用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30=' } ✅ 用户 2 认证成功 用户 2 断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754673073152_ult8yx2bh', conversationId: 'c2c_2_3', to: '2', text: '我啊' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 我啊 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '我啊', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-08T17:11:13.957Z, timestamp: 1754673073957 } ✅ 离线消息已存储到MongoDB,ID: 68962fb163690977b52a4f6e ✅ 离线消息已存储,消息ID: 68962fb163690977b52a4f6e 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 我啊 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "我啊", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754673073152_ult8yx2bh" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102451882341456' } 📲 极光推送通知已发送给离线用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754673081442_7vxp7gd2y', conversationId: 'c2c_2_3', to: '2', text: '唉' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 唉 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '唉', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-08T17:11:22.231Z, timestamp: 1754673082231 } ✅ 离线消息已存储到MongoDB,ID: 68962fba63690977b52a4f6f ✅ 离线消息已存储,消息ID: 68962fba63690977b52a4f6f 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 唉 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "唉", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754673081442_7vxp7gd2y" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102451882791250' } 📲 极光推送通知已发送给离线用户 2 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDc1OTc1M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 4 条离线消息 for 用户 2 - 聊天消息: 4 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 4 条离线消息 for 用户 2 - 聊天消息: 4 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 4 条离线消息 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 用户 2 断开连接 🔌 连接到MongoDB服务器... ✅ MongoDB连接成功 WebSocket服务器启动在 188.68.250.202:22809 WebSocket连接地址: ws://188.68.250.202:22809 🚀 所有服务已启动 HTTP服务器启动在 188.68.250.202:16894 健康检查: http://188.68.250.202:16894/health 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'send_message', messageId: 'msg_1754740560455_zfbrpa4vr', conversationId: 'c2c_2_3', to: '2', text: '干啥呢' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 干啥呢 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "干啥呢", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754740560455_zfbrpa4vr" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453791095159' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754740705668_gm7fp32sq', conversationId: 'c2c_2_3', to: '3', text: '好好好' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 3 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'send_message', messageId: 'msg_1754740715990_pm1s2fnuc', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 3 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754740792352_u73qu7uq0', conversationId: 'c2c_2_3', to: '3', text: '好' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754740792352_u73qu7uq0" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453797665769' } 📲 极光推送通知已发送给用户 3 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754740801828_fq73sykvl', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754740801828_fq73sykvl" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453798582535' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754741459071_cz72b151o', conversationId: 'c2c_2_3', to: '2', text: '[图片] {"code":201,"data":{"id":"xjtj7zj6spo7","name":"1000001784.jpg","isDirectory":false,"locationId":"3eb9t1559lkv","size":95692,"expiry":"2025-08-13T12:11:04.128224Z","views":0,"downloads":0,"sha1":"a362952e1e679efec7670f2ad259d22f46537f58","note":"","createdAt":"2025-08-09T12:11:04.128224Z"}}' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] {"code":201,"data":{"id":"xjtj7zj6spo7","name... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] {\"code\":201,\"data\":{\"id\":\"xjtj7zj6spo7\",\"name...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754741459071_cz72b151o" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453824655888' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754741390820_liizod33o', conversationId: 'c2c_2_3', to: '2', text: '[文件] resend_numberdb2.bin (6) {"code":201,"data":{"id":"417vmat84wg8","name":"resend_numberdb2.bin (6)","isDirectory":false,"locationId":"3eb9t1559lkv","size":2285163,"expiry":"2025-08-13T12:10:54.103404Z","views":0,"downloads":0,"sha1":"e09aae1ff3c2e7dd4eac77bdf161d91127bc0b53","note":"","createdAt":"2025-08-09T12:10:54.103404Z"}}' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [文件] resend_numberdb2.bin (6) {"code":201,"data":{... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[文件] resend_numberdb2.bin (6) {\"code\":201,\"data\":{...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754741390820_liizod33o" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 用户 2 断开连接 ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453830919022' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754741590777_ejxidwslq', conversationId: 'c2c_2_3', to: '2', text: '[图片] {"code":201,"data":{"id":"bv0i907e6n3q","name":"1000001784.jpg","isDirectory":false,"locationId":"3eb9t1559lkv","size":95692,"expiry":"2025-08-13T12:13:11.960651Z","views":0,"downloads":0,"sha1":"a362952e1e679efec7670f2ad259d22f46537f58","note":"","createdAt":"2025-08-09T12:13:11.960651Z"}}' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] {"code":201,"data":{"id":"bv0i907e6n3q","name... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] {\"code\":201,\"data\":{\"id\":\"bv0i907e6n3q\",\"name...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754741590777_ejxidwslq" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453834490410' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754741759743_hzst82b70', conversationId: 'c2c_2_3', to: '2', text: '[图片] {"code":201,"data":{"id":"nhok0i22qtey","name":"1000001784.jpg","isDirectory":false,"locationId":"3eb9t1559lkv","size":95692,"expiry":"2025-08-13T12:16:00.928589Z","views":0,"downloads":0,"sha1":"a362952e1e679efec7670f2ad259d22f46537f58","note":"","createdAt":"2025-08-09T12:16:00.928589Z"}}' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] {"code":201,"data":{"id":"nhok0i22qtey","name... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] {\"code\":201,\"data\":{\"id\":\"nhok0i22qtey\",\"name...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754741759743_hzst82b70" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453837286091' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 心跳超时,断开连接 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754741944135_1wqluk97x', conversationId: 'c2c_2_3', to: '2', text: '好' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 好 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '好', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-09T12:19:05.227Z, timestamp: 1754741945227 } ✅ 离线消息已存储到MongoDB,ID: 68973cb9ee6ed20d6b5b5578 ✅ 离线消息已存储,消息ID: 68973cb9ee6ed20d6b5b5578 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754741944135_1wqluk97x" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453844845319' } 📲 极光推送通知已发送给离线用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754741954425_3gj9dr4x6', conversationId: 'c2c_2_3', to: '2', text: '啊' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 啊 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '啊', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-09T12:19:15.537Z, timestamp: 1754741955537 } ✅ 离线消息已存储到MongoDB,ID: 68973cc3ee6ed20d6b5b5579 ✅ 离线消息已存储,消息ID: 68973cc3ee6ed20d6b5b5579 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 啊 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "啊", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754741954425_3gj9dr4x6" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453844846653' } 📲 极光推送通知已发送给离线用户 2 新的WebSocket连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 2 条离线消息 for 用户 2 - 聊天消息: 2 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 2 条离线消息 for 用户 2 - 聊天消息: 2 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 2 条离线消息 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754742176042_w7zoom2cj', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://w.buzzheavier.com/1000019125.jpg' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://w.buzzheavier.com/1000019125.jpg 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://w.buzzheavier.com/1000019125.jpg", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754742176042_w7zoom2cj" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102453856029501' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 心跳超时,断开连接 用户 3 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754751339135_otrk5kfcd', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754751341.jpg?t=1754751341' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: [图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754751341.jpg?t=1754751341 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754751341.jpg?t=1754751341', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T14:55:41.523Z, timestamp: 1754751341523 } ✅ 离线消息已存储到MongoDB,ID: 6897616dee6ed20d6b5b557a ✅ 离线消息已存储,消息ID: 6897616dee6ed20d6b5b557a 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754751339135_otrk5kfcd" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454168546216' } 📲 极光推送通知已发送给离线用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754751348814_1zaw4anxr', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754751349.jpg?t=1754751349' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: [图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754751349.jpg?t=1754751349 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754751349.jpg?t=1754751349', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T14:55:49.792Z, timestamp: 1754751349792 } ✅ 离线消息已存储到MongoDB,ID: 68976175ee6ed20d6b5b557b ✅ 离线消息已存储,消息ID: 68976175ee6ed20d6b5b557b 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754751348814_1zaw4anxr" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454168211531' } 📲 极光推送通知已发送给离线用户 3 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 2 条离线消息 for 用户 3 - 聊天消息: 2 条 - 推送消息: 0 条 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 2 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754751375834_7ye3b827w', conversationId: 'c2c_2_3', to: '3', text: '好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754751375834_7ye3b827w" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454167953211' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754751385064_7z33hqmwc', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754751385.jpg?t=1754751385' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754751385064_7z33hqmwc" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454168322202' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754751580325_b6jcosit3', conversationId: 'c2c_2_3', to: '3', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754751582.mp4?t=1754751582' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754751580325_b6jcosit3" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454175474493' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754752055157_od8u4stuz', conversationId: 'c2c_2_3', to: '3', text: '[文件] abc_background_cache_hint_selector_material_dark.xml https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_file_1754752055.xml?t=1754752055' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [文件] abc_background_cache_hint_selector_material_d... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[文件] abc_background_cache_hint_selector_material_d...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754752055157_od8u4stuz" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454187811583' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754752247945_gy8h1trit', conversationId: 'c2c_2_3', to: '3', text: '[文件] movie.html https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_file_1754752248.html?t=1754752248' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [文件] movie.html https://gstikun.jkun.cf/image/chat... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[文件] movie.html https://gstikun.jkun.cf/image/chat...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754752247945_gy8h1trit" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454193785609' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754752255615_15a033w6d', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754752256.jpg?t=1754752256' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754752255615_15a033w6d" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454194038968' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754752366519_ajmy4363b', conversationId: 'c2c_2_3', to: '3', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754752369.mp4?t=1754752369' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754752366519_ajmy4363b" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454196477726' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 新的WebSocket连接 用户 2 断开连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754753588901_x2vsurqec', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754753590.jpg?t=1754753590' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754753588901_x2vsurqec" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454228503859' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754753616994_7c15tritj', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754753617.jpg?t=1754753617' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754753616994_7c15tritj" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454228720557' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754753828626_rzwyd7v3y', conversationId: 'c2c_1_2', to: '1', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754753829.jpg?t=1754753829' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754753829.jpg?t=1754753829 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754753829.jpg?t=1754753829', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T15:37:10.027Z, timestamp: 1754753830027 } ✅ 离线消息已存储到MongoDB,ID: 68976b26ee6ed20d6b5b557c ✅ 离线消息已存储,消息ID: 68976b26ee6ed20d6b5b557c ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754753849229_hpcznindw', conversationId: 'c2c_1_2', to: '1', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754753849.jpg?t=1754753849' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754753849.jpg?t=1754753849 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754753849.jpg?t=1754753849', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T15:37:29.762Z, timestamp: 1754753849762 } ✅ 离线消息已存储到MongoDB,ID: 68976b39ee6ed20d6b5b557d ✅ 离线消息已存储,消息ID: 68976b39ee6ed20d6b5b557d ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754753864088_6y1ob6xpb', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754753866.jpg?t=1754753866' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754753864088_6y1ob6xpb" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 用户 2 断开连接 新的WebSocket连接 ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454234584999' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754754327800_pld0f28gx', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754754329.jpg?t=1754754329' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754754327800_pld0f28gx" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454247061351' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754754965417_4vm16efta', conversationId: 'c2c_2_3', to: '3', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754754968.mp4?t=1754754968' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754754965417_4vm16efta" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454260226128' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754755434974_fijavy8bs', conversationId: 'c2c_2_3', to: '3', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754755437.mp4?t=1754755437' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754755434974_fijavy8bs" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454269171886' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754755576232_nu3iwtq56', conversationId: 'c2c_2_3', to: '3', text: '🤓' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 🤓 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "🤓", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754755576232_nu3iwtq56" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454272595481' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 未认证用户断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 新的WebSocket连接 用户 2 断开连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754756283772_ep6gcxkgg', conversationId: 'c2c_2_3', to: '3', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754756288.mp4?t=1754756288' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754756283772_ep6gcxkgg" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454284333671' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 新的WebSocket连接 用户 2 断开连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754756398755_dcj2ud8kd', conversationId: 'c2c_2_3', to: '2', text: 'hh' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - hh 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "hh", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754756398755_dcj2ud8kd" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454286277318' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754756405372_n03mywwme', conversationId: 'c2c_2_3', to: '3', text: '好好好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好好好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好好好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754756405372_n03mywwme" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454286994903' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754756720923_uzlt68hcn', conversationId: 'c2c_1_2', to: '1', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754756722.jpg?t=1754756722' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754756722.jpg?t=1754756722 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754756722.jpg?t=1754756722', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T16:25:22.166Z, timestamp: 1754756722166 } ✅ 离线消息已存储到MongoDB,ID: 68977672ee6ed20d6b5b557e ✅ 离线消息已存储,消息ID: 68977672ee6ed20d6b5b557e ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754756994324_0kglzf8nx', conversationId: 'c2c_1_2', to: '1', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754756995.jpg?t=1754756995' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754756995.jpg?t=1754756995 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754756995.jpg?t=1754756995', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T16:29:55.262Z, timestamp: 1754756995262 } ✅ 离线消息已存储到MongoDB,ID: 68977783ee6ed20d6b5b557f ✅ 离线消息已存储,消息ID: 68977783ee6ed20d6b5b557f ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 用户 2 断开连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'send_message', messageId: 'msg_1754757268377_oeuuxe902', conversationId: 'c2c_1_2', to: '1', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754757269.jpg?t=1754757269' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754757269.jpg?t=1754757269 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_image_1754757269.jpg?t=1754757269', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T16:34:29.796Z, timestamp: 1754757269796 } ✅ 离线消息已存储到MongoDB,ID: 68977895ee6ed20d6b5b5580 ✅ 离线消息已存储,消息ID: 68977895ee6ed20d6b5b5580 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'send_message', messageId: 'msg_1754757289971_1jwpzsik3', conversationId: 'c2c_1_2', to: '1', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754757295.mp4?t=1754757295' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [视频] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754757295.mp4?t=1754757295 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754757295.mp4?t=1754757295', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T16:34:55.421Z, timestamp: 1754757295421 } ✅ 离线消息已存储到MongoDB,ID: 689778afee6ed20d6b5b5581 ✅ 离线消息已存储,消息ID: 689778afee6ed20d6b5b5581 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754757315923_13j576jer', conversationId: 'c2c_1_2', to: '1', text: '[文件] movie.html https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_file_1754757316.html?t=1754757316' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [文件] movie.html https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_file_1754757316.html?t=1754757316 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[文件] movie.html https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_file_1754757316.html?t=1754757316', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T16:35:16.576Z, timestamp: 1754757316576 } ✅ 离线消息已存储到MongoDB,ID: 689778c4ee6ed20d6b5b5582 ✅ 离线消息已存储,消息ID: 689778c4ee6ed20d6b5b5582 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 新的WebSocket连接 用户 2 断开连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 用户 2 断开连接 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754757378936_51nrw8nab', conversationId: 'c2c_1_2', to: '1', text: '哈哈' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: 哈哈 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '哈哈', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T16:36:19.035Z, timestamp: 1754757379035 } ✅ 离线消息已存储到MongoDB,ID: 68977903ee6ed20d6b5b5583 ✅ 离线消息已存储,消息ID: 68977903ee6ed20d6b5b5583 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754757378936_51nrw8nab', conversationId: 'c2c_1_2', to: '1', text: '哈哈' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: 哈哈 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '哈哈', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T16:38:13.205Z, timestamp: 1754757493205 } ✅ 离线消息已存储到MongoDB,ID: 68977975ee6ed20d6b5b5584 ✅ 离线消息已存储,消息ID: 68977975ee6ed20d6b5b5584 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 用户 2 断开连接 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 心跳超时,断开连接 用户 2 心跳超时,断开连接 用户 2 断开连接 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDc2MDA0MH0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'send_message', messageId: 'msg_1754768626229_tr18fksdi', conversationId: 'c2c_2_3', to: '2', text: '你是' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDg1NzQ4OX0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754768697469_sxtmfu0r0', conversationId: 'c2c_2_3', to: '2', text: '干啥呢' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 干啥呢 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "干啥呢", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754768697469_sxtmfu0r0" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454451576855' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754768720690_w2pr2uy89', conversationId: 'c2c_2_3', to: '3', text: '哈哈哈' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754768720690_w2pr2uy89" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454451579059' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754768730376_j8uxr58d3', conversationId: 'c2c_2_3', to: '3', text: '好好好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好好好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好好好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754768730376_j8uxr58d3" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454452100567' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754768769813_mkgir7hj2', conversationId: 'c2c_2_3', to: '2', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_image_1754768771.jpg?t=1754768771' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754768769813_mkgir7hj2" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454452560303' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754768838481_z8zvc8ejv', conversationId: 'c2c_2_3', to: '2', text: '。' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 。 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "。", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754768838481_z8zvc8ejv" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454452711594' } 📲 极光推送通知已发送给用户 2 用户 2 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754769814474_nofplspoh', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754769817.mp4?t=1754769817' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754769814474_nofplspoh" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454464688741' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754772240083_x248qjmn0', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754772240083_x248qjmn0" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102454491631748' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 心跳超时,断开连接 用户 3 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_4' } 🗑️ 删除用户 2 在会话 c2c_2_4 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_4' } 用户 2 加入会话 c2c_2_4 收到消息: { type: 'send_message', messageId: 'msg_1754773343857_snpuyao26', conversationId: 'c2c_2_4', to: '4', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_4_2_video_1754773344.mp4?t=1754773344' } 📴 用户 4 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 4: [视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_4_2_video_1754773344.mp4?t=1754773344 📦 MongoDB文档: { target_user_id: 4, conversation_id: 'c2c_2_4', message_content: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_4_2_video_1754773344.mp4?t=1754773344', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T21:02:24.106Z, timestamp: 1754773344106 } ✅ 离线消息已存储到MongoDB,ID: 6897b760ee6ed20d6b5b5585 ✅ 离线消息已存储,消息ID: 6897b760ee6ed20d6b5b5585 ⚠️ 离线用户 4 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_4' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_4' } 🗑️ 删除用户 2 在会话 c2c_2_4 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_4' } 用户 2 加入会话 c2c_2_4 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_4' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_4' } 🗑️ 删除用户 2 在会话 c2c_2_4 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_4' } 用户 2 加入会话 c2c_2_4 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_4' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_4' } 🗑️ 删除用户 2 在会话 c2c_2_4 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_4' } 用户 2 加入会话 c2c_2_4 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_4' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_4' } 🗑️ 删除用户 2 在会话 c2c_2_4 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_4' } 用户 2 加入会话 c2c_2_4 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_4' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_4' } 🗑️ 删除用户 2 在会话 c2c_2_4 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_4' } 用户 2 加入会话 c2c_2_4 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDgyOTI3M30=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_4' } 🗑️ 删除用户 2 在会话 c2c_2_4 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_4' } 用户 2 加入会话 c2c_2_4 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_4' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754775005892_dx7r953th', conversationId: 'c2c_1_2', to: '1', text: '哈哈' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: 哈哈 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '哈哈', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T21:30:05.271Z, timestamp: 1754775005271 } ✅ 离线消息已存储到MongoDB,ID: 6897bdddee6ed20d6b5b5586 ✅ 离线消息已存储,消息ID: 6897bdddee6ed20d6b5b5586 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754775301643_ilnl07xmx', conversationId: 'c2c_1_2', to: '1', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754775301.mp4?t=1754775301' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [视频] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754775301.mp4?t=1754775301 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754775301.mp4?t=1754775301', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T21:35:01.870Z, timestamp: 1754775301870 } ✅ 离线消息已存储到MongoDB,ID: 6897bf05ee6ed20d6b5b5587 ✅ 离线消息已存储,消息ID: 6897bf05ee6ed20d6b5b5587 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 ✅ 已删除 0 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 ✅ 已删除 0 条离线消息 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754777416319_4cd04l3fs', conversationId: 'c2c_1_2', to: '1', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754777416.mp4?t=1754777416' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [视频] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754777416.mp4?t=1754777416 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754777416.mp4?t=1754777416', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T22:10:16.640Z, timestamp: 1754777416640 } ✅ 离线消息已存储到MongoDB,ID: 6897c748ee6ed20d6b5b5588 ✅ 离线消息已存储,消息ID: 6897c748ee6ed20d6b5b5588 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754778261486_7vbeb86ij', conversationId: 'c2c_1_2', to: '1', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754778261.mp4?t=1754778261' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754778261.mp4?t=1754778261 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754778261.mp4?t=1754778261', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T22:24:22.021Z, timestamp: 1754778262021 } ✅ 离线消息已存储到MongoDB,ID: 6897ca96ee6ed20d6b5b5589 ✅ 离线消息已存储,消息ID: 6897ca96ee6ed20d6b5b5589 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754778285898_8xpjnl5sa', conversationId: 'c2c_1_2', to: '1', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754778286.mp4?t=1754778286' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754778286.mp4?t=1754778286 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754778286.mp4?t=1754778286', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T22:24:46.784Z, timestamp: 1754778286784 } ✅ 离线消息已存储到MongoDB,ID: 6897caaeee6ed20d6b5b558a ✅ 离线消息已存储,消息ID: 6897caaeee6ed20d6b5b558a ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754778812589_xcrutyy2e', conversationId: 'c2c_1_2', to: '1', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754778812.mp4?t=1754778812' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754778812.mp4?t=1754778812 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754778812.mp4?t=1754778812', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T22:33:33.183Z, timestamp: 1754778813183 } ✅ 离线消息已存储到MongoDB,ID: 6897ccbdee6ed20d6b5b558b ✅ 离线消息已存储,消息ID: 6897ccbdee6ed20d6b5b558b ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754779306218_o9ewa81ju', conversationId: 'c2c_1_2', to: '1', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754779306.mp4?t=1754779306' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754779306.mp4?t=1754779306 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754779306.mp4?t=1754779306', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T22:41:46.694Z, timestamp: 1754779306694 } ✅ 离线消息已存储到MongoDB,ID: 6897ceaaee6ed20d6b5b558c ✅ 离线消息已存储,消息ID: 6897ceaaee6ed20d6b5b558c ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754779416373_78j72d3qi', conversationId: 'c2c_1_2', to: '1', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754779416.mp4?t=1754779416' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754779416.mp4?t=1754779416 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754779416.mp4?t=1754779416', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-09T22:43:37.067Z, timestamp: 1754779417067 } ✅ 离线消息已存储到MongoDB,ID: 6897cf19ee6ed20d6b5b558d ✅ 离线消息已存储,消息ID: 6897cf19ee6ed20d6b5b558d ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754824686171_rg8azzlds', conversationId: 'c2c_2_3', to: '3', text: '[图片] file:///data/user/0/com.zbaichat/cache/rn_image_picker_lib_temp_324de699-4b79-43d2-9e3d-b41eb6ec15b9.png' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: [图片] file:///data/user/0/com.zbaichat/cache/rn_image_picker_lib_temp_324de699-4b79-43d2-9e3d-b41eb6ec15b9.png 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '[图片] file:///data/user/0/com.zbaichat/cache/rn_image_picker_lib_temp_324de699-4b79-43d2-9e3d-b41eb6ec15b9.png', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T11:18:29.938Z, timestamp: 1754824709938 } ✅ 离线消息已存储到MongoDB,ID: 68988005ee6ed20d6b5b558e ✅ 离线消息已存储,消息ID: 68988005ee6ed20d6b5b558e 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] file:///data/user/0/com.zbaichat/cache/rn_ima... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] file:///data/user/0/com.zbaichat/cache/rn_ima...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754824686171_rg8azzlds" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456122094396' } 📲 极光推送通知已发送给离线用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754824686171_rg8azzlds', conversationId: 'c2c_2_3', to: '3', text: '[图片] file:///data/user/0/com.zbaichat/cache/rn_image_picker_lib_temp_324de699-4b79-43d2-9e3d-b41eb6ec15b9.png' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: [图片] file:///data/user/0/com.zbaichat/cache/rn_image_picker_lib_temp_324de699-4b79-43d2-9e3d-b41eb6ec15b9.png 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '[图片] file:///data/user/0/com.zbaichat/cache/rn_image_picker_lib_temp_324de699-4b79-43d2-9e3d-b41eb6ec15b9.png', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T11:19:30.731Z, timestamp: 1754824770731 } ✅ 离线消息已存储到MongoDB,ID: 68988042ee6ed20d6b5b558f ✅ 离线消息已存储,消息ID: 68988042ee6ed20d6b5b558f 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] file:///data/user/0/com.zbaichat/cache/rn_ima... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] file:///data/user/0/com.zbaichat/cache/rn_ima...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754824686171_rg8azzlds" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456124226541' } 📲 极光推送通知已发送给离线用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754824726783_etvbk3pit', conversationId: 'c2c_2_3', to: '3', text: '[视频] content://com.android.providers.media.documents/document/video%3A1000015842' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: [视频] content://com.android.providers.media.documents/document/video%3A1000015842 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '[视频] content://com.android.providers.media.documents/document/video%3A1000015842', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T11:19:32.759Z, timestamp: 1754824772759 } ✅ 离线消息已存储到MongoDB,ID: 68988044ee6ed20d6b5b5590 ✅ 离线消息已存储,消息ID: 68988044ee6ed20d6b5b5590 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] content://com.android.providers.media.documen... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] content://com.android.providers.media.documen...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754824726783_etvbk3pit" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456125664332' } 📲 极光推送通知已发送给离线用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754824747481_4yj3tolah', conversationId: 'c2c_2_3', to: '3', text: 'movie.html content://com.android.providers.media.documents/document/document%3A1000017065' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: movie.html content://com.android.providers.media.documents/document/document%3A1000017065 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: 'movie.html content://com.android.providers.media.documents/document/document%3A1000017065', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T11:19:34.691Z, timestamp: 1754824774691 } ✅ 离线消息已存储到MongoDB,ID: 68988046ee6ed20d6b5b5591 ✅ 离线消息已存储,消息ID: 68988046ee6ed20d6b5b5591 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - movie.html content://com.android.providers.media.d... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "movie.html content://com.android.providers.media.d...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754824747481_4yj3tolah" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456124226996' } 📲 极光推送通知已发送给离线用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754824747481_4yj3tolah', conversationId: 'c2c_2_3', to: '3', text: 'movie.html content://com.android.providers.media.documents/document/document%3A1000017065' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: movie.html content://com.android.providers.media.documents/document/document%3A1000017065 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: 'movie.html content://com.android.providers.media.documents/document/document%3A1000017065', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T11:19:45.401Z, timestamp: 1754824785401 } ✅ 离线消息已存储到MongoDB,ID: 68988051ee6ed20d6b5b5592 ✅ 离线消息已存储,消息ID: 68988051ee6ed20d6b5b5592 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - movie.html content://com.android.providers.media.d... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "movie.html content://com.android.providers.media.d...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754824747481_4yj3tolah" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456126302931' } 📲 极光推送通知已发送给离线用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754824799783_g2hxx8bqe', conversationId: 'c2c_2_3', to: '3', text: '哈哈哈' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: 哈哈哈 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '哈哈哈', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T11:19:59.235Z, timestamp: 1754824799235 } ✅ 离线消息已存储到MongoDB,ID: 6898805fee6ed20d6b5b5593 ✅ 离线消息已存储,消息ID: 6898805fee6ed20d6b5b5593 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754824799783_g2hxx8bqe" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456126393594' } 📲 极光推送通知已发送给离线用户 3 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 新的WebSocket连接 用户 2 断开连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754847012000_ocs2zt5qr', conversationId: 'c2c_1_2', to: '1', text: '[视频] content://com.android.providers.media.documents/document/video%3A1000019022' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [视频] content://com.android.providers.media.documents/document/video%3A1000019022 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[视频] content://com.android.providers.media.documents/document/video%3A1000019022', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T17:30:22.530Z, timestamp: 1754847022530 } ✅ 离线消息已存储到MongoDB,ID: 6898d72eee6ed20d6b5b5594 ✅ 离线消息已存储,消息ID: 6898d72eee6ed20d6b5b5594 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754847264208_no6q7vjbc', conversationId: 'c2c_1_2', to: '1', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754847266.mp4?t=1754847266' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754847266.mp4?t=1754847266 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754847266.mp4?t=1754847266', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T17:34:26.987Z, timestamp: 1754847266987 } ✅ 离线消息已存储到MongoDB,ID: 6898d822ee6ed20d6b5b5595 ✅ 离线消息已存储,消息ID: 6898d822ee6ed20d6b5b5595 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 新的WebSocket连接 用户 2 断开连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754847558857_x0z5sugju', conversationId: 'c2c_1_2', to: '1', text: '[视频] /data/user/0/com.zbaichat/files/media/videos/1754847558803_k0at3qe2f.mp4' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [视频] /data/user/0/com.zbaichat/files/media/videos/1754847558803_k0at3qe2f.mp4 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[视频] /data/user/0/com.zbaichat/files/media/videos/1754847558803_k0at3qe2f.mp4', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T17:39:23.062Z, timestamp: 1754847563062 } ✅ 离线消息已存储到MongoDB,ID: 6898d94bee6ed20d6b5b5596 ✅ 离线消息已存储,消息ID: 6898d94bee6ed20d6b5b5596 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754847573266_mjr1uyr4o', conversationId: 'c2c_1_2', to: '1', text: '[视频] /data/user/0/com.zbaichat/files/media/videos/1754847573227_50cnwek7p.mp4' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: [视频] /data/user/0/com.zbaichat/files/media/videos/1754847573227_50cnwek7p.mp4 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: '[视频] /data/user/0/com.zbaichat/files/media/videos/1754847573227_50cnwek7p.mp4', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T17:39:35.507Z, timestamp: 1754847575507 } ✅ 离线消息已存储到MongoDB,ID: 6898d957ee6ed20d6b5b5597 ✅ 离线消息已存储,消息ID: 6898d957ee6ed20d6b5b5597 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754847814918_rblsp32nm', conversationId: 'c2c_1_2', to: '1', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754847817.mp4?t=1754847817' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754847817.mp4?t=1754847817 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754847817.mp4?t=1754847817', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T17:43:37.973Z, timestamp: 1754847817973 } ✅ 离线消息已存储到MongoDB,ID: 6898da49ee6ed20d6b5b5598 ✅ 离线消息已存储,消息ID: 6898da49ee6ed20d6b5b5598 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'send_message', messageId: 'msg_1754847940994_bpntxj4pe', conversationId: 'c2c_1_2', to: '1', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754847943.mp4?t=1754847943' } 📴 用户 1 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 1: https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754847943.mp4?t=1754847943 📦 MongoDB文档: { target_user_id: 1, conversation_id: 'c2c_1_2', message_content: 'https://gstikun.jkun.cf/image/chat_media_c2c_1_2_2_video_1754847943.mp4?t=1754847943', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T17:45:43.639Z, timestamp: 1754847943639 } ✅ 离线消息已存储到MongoDB,ID: 6898dac7ee6ed20d6b5b5599 ✅ 离线消息已存储,消息ID: 6898dac7ee6ed20d6b5b5599 ⚠️ 离线用户 1 未注册极光推送RegistrationID,跳过推送 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_1_2' } 🗑️ 删除用户 2 在会话 c2c_1_2 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_1_2' } 用户 2 加入会话 c2c_1_2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_1_2' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDg1NzQ4OX0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 6 条离线消息 for 用户 3 - 聊天消息: 6 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 6 条离线消息 for 用户 3 - 聊天消息: 6 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 3 的所有离线消息 ✅ 已删除 6 条离线消息 收到消息: { type: 'heartbeat' } 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDg1NzQ4OX0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754848382099_5kvwoel2x', conversationId: 'c2c_2_3', to: '3', text: '嗨' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 嗨 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "嗨", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754848382099_5kvwoel2x" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456764724287' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754848394492_30rjgrvz1', conversationId: 'c2c_2_3', to: '3', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754848397.mp4?t=1754848397' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754848394492_30rjgrvz1" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456765296558' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754848420017_3e7fippo0', conversationId: 'c2c_2_3', to: '3', text: 'https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754848420.jpg?t=1754848420' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754848420017_3e7fippo0" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456765665409' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754848443288_l863r7mzo', conversationId: 'c2c_2_3', to: '3', text: 'CommentCoreLibrary.min.css https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_file_1754848442.css?t=1754848442' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - CommentCoreLibrary.min.css https://gstikun.jkun.cf... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "CommentCoreLibrary.min.css https://gstikun.jkun.cf...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754848443288_l863r7mzo" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456764729180' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDg1NzQ4OX0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 用户 3 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDg1NzQ4OX0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 3 -> RegistrationID 1a0018970b80dd79f52 ✅ 极光推送RegistrationID已注册: 用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754848681741_rieqwbacb', conversationId: 'c2c_2_3', to: '3', text: '文件' } 📱 消息已实时发送给在线用户 3(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 文件 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "文件", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754848681741_rieqwbacb" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456768994889' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754848772123_fwsqyc9ct', conversationId: 'c2c_2_3', to: '3', text: '[文件] CommentCoreLibrary.min.css https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_file_1754848771.css?t=1754848771' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [文件] CommentCoreLibrary.min.css https://gstikun.jk... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[文件] CommentCoreLibrary.min.css https://gstikun.jk...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754848772123_fwsqyc9ct" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456769278477' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754848817174_l3jn1nkmp', conversationId: 'c2c_2_3', to: '3', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754848820.mp4?t=1754848820' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754848817174_l3jn1nkmp" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456770969760' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754848847913_8i51twvtq', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754848848.jpg?t=1754848848' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754848847913_8i51twvtq" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456770256230' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754848864478_6acsqur8v', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754848864.jpg?t=1754848864' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754848864478_6acsqur8v" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456771300007' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754849018691_fuswbhc3x', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754849018.jpg?t=1754849018' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754849018691_fuswbhc3x" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456772860293' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754849116515_atoj4h89g', conversationId: 'c2c_2_3', to: '2', text: '[文件] numberdb2.bin (6) https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_file_1754849119.bin (6)?t=1754849119' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [文件] numberdb2.bin (6) https://gstikun.jkun.cf/ima... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[文件] numberdb2.bin (6) https://gstikun.jkun.cf/ima...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754849116515_atoj4h89g" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456774197756' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754849149620_vc24j90om', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754849153.mp4?t=1754849153' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754849149620_vc24j90om" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456774842410' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754849199311_leyz1m7fu', conversationId: 'c2c_2_3', to: '2', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_image_1754849201.jpg?t=1754849201' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754849199311_leyz1m7fu" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456775914783' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754849548188_jaonl6dak', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754849551.mp4?t=1754849551' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: [视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754849551.mp4?t=1754849551 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754849551.mp4?t=1754849551', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-10T18:12:32.013Z, timestamp: 1754849552013 } ✅ 离线消息已存储到MongoDB,ID: 6898e110ee6ed20d6b5b559a ✅ 离线消息已存储,消息ID: 6898e110ee6ed20d6b5b559a 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754849548188_jaonl6dak" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456780555673' } 📲 极光推送通知已发送给离线用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 1 条离线消息 for 用户 2 - 聊天消息: 1 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 1 条离线消息 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754849785617_ih3rq301e', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754849788.mp4?t=1754849788' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754849785617_ih3rq301e" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456782644299' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754850257734_2qoa1ea4v', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754850262.mp4?t=1754850262' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754850257734_2qoa1ea4v" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456788930367' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754850405592_sbv5yskq2', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754850408.mp4?t=1754850408' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754850405592_sbv5yskq2" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456790507699' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 收到消息: { type: 'send_message', messageId: 'msg_1754850646530_vxu68f4lo', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754850649.mp4?t=1754850649' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: [视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754850649.mp4?t=1754850649 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754850649.mp4?t=1754850649', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-10T18:30:50.045Z, timestamp: 1754850650045 } ✅ 离线消息已存储到MongoDB,ID: 6898e55aee6ed20d6b5b559b ✅ 离线消息已存储,消息ID: 6898e55aee6ed20d6b5b559b 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754850646530_vxu68f4lo" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456793386416' } 📲 极光推送通知已发送给离线用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754850667113_ngme084l1', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 📴 用户 2 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 2: 哈哈 📦 MongoDB文档: { target_user_id: 2, conversation_id: 'c2c_2_3', message_content: '哈哈', sender_id: 3, message_type: 'TEXT', created_at: 2025-08-10T18:31:08.432Z, timestamp: 1754850668432 } ✅ 离线消息已存储到MongoDB,ID: 6898e56cee6ed20d6b5b559c ✅ 离线消息已存储,消息ID: 6898e56cee6ed20d6b5b559c 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754850667113_ngme084l1" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456793876793' } 📲 极光推送通知已发送给离线用户 2 用户 2 断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 2 条离线消息 for 用户 2 - 聊天消息: 2 条 - 推送消息: 0 条 用户 2 断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 2 条离线消息 for 用户 2 - 聊天消息: 2 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 2 的所有离线消息 ✅ 已删除 2 条离线消息 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754850798399_z2oqztwxc', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754850802.mp4?t=1754850802' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754850798399_z2oqztwxc" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456795467386' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754850830591_qcb73juxi', conversationId: 'c2c_2_3', to: '3', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754850834.mp4?t=1754850834' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754850830591_qcb73juxi" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456795469713' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754850839771_teifk8smj', conversationId: 'c2c_2_3', to: '3', text: '好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754850839771_teifk8smj" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456795437796' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754850847042_m4ubddmh7', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754850847042_m4ubddmh7" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456795829517' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754850856297_3scx4bpgx', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754850856297_3scx4bpgx" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456795830193' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754851020154_29yivfm9t', conversationId: 'c2c_2_3', to: '3', text: '好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851020154_29yivfm9t" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456797821750' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754851047363_wydv00cyz', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754851047.jpg?t=1754851047' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851047363_wydv00cyz" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456798110645' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754851080269_idreammr8', conversationId: 'c2c_2_3', to: '2', text: '哈哈' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754851080269_idreammr8" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456798307849' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754851087116_winr1nw2x', conversationId: 'c2c_2_3', to: '2', text: '好' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754851087116_winr1nw2x" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456798308442' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754851095175_1488ufnjw', conversationId: 'c2c_2_3', to: '3', text: '。' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 。 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "。", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851095175_1488ufnjw" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456798904397' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851099323_108vlec6u', conversationId: 'c2c_2_3', to: '2', text: '不错' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 不错 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "不错", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754851099323_108vlec6u" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456799262856' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754851111142_zp356nevu', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851111142_zp356nevu" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456799263558' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851113938_7xyqmnhzx', conversationId: 'c2c_2_3', to: '2', text: '。' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 。 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "。", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754851113938_7xyqmnhzx" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456799157702' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754851120432_5fhrp9ues', conversationId: 'c2c_2_3', to: '2', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_image_1754851122.jpg?t=1754851122' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754851120432_5fhrp9ues" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456799206613' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754851135021_cab8hs7i3', conversationId: 'c2c_2_3', to: '3', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_image_1754851135.jpg?t=1754851135' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851135021_cab8hs7i3" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456800055324' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754851375993_0azqnekly', conversationId: 'c2c_2_3', to: '3', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754851378.mp4?t=1754851378' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851375993_0azqnekly" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456802103632' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754851464870_7g44yb5uv', conversationId: 'c2c_2_3', to: '3', text: '1' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 1 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "1", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851464870_7g44yb5uv" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803902925' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754851470223_vj9eaigco', conversationId: 'c2c_2_3', to: '3', text: '^3jdjdj' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - ^3jdjdj 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "^3jdjdj", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851470223_vj9eaigco" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803226204' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851473312_tyvcvszeq', conversationId: 'c2c_2_3', to: '3', text: 'dbdjdj' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - dbdjdj 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "dbdjdj", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851473312_tyvcvszeq" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456802981808' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851475706_jy4z7wgmc', conversationId: 'c2c_2_3', to: '3', text: 'djdjdj' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - djdjdj 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "djdjdj", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851475706_jy4z7wgmc" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456802974172' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851478984_tmot9reab', conversationId: 'c2c_2_3', to: '3', text: 'djdjd1' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - djdjd1 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "djdjd1", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851478984_tmot9reab" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456804114745' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851482664_wjrpqbjbi', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851482664_wjrpqbjbi" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803227206' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851484233_058iyb2bh', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851484233_058iyb2bh" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803227303' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851485261_nhhu0c9a9', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851485261_nhhu0c9a9" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803399185' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851486098_q1kdfcr6r', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851486098_q1kdfcr6r" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456804115246' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851486859_nuh96lml0', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851486859_nuh96lml0" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456804229674' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851487585_2s5b374d1', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851487585_2s5b374d1" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803904621' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851488457_jb6u3ctjn', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851488457_jb6u3ctjn" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'send_message', messageId: 'msg_1754851489014_717df1qto', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851489014_717df1qto" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803399419' } 📲 极光推送通知已发送给用户 3 ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456804418107' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851489625_q8fgxuuk4', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851489625_q8fgxuuk4" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803904771' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851490254_0mhs0nor8', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851490254_0mhs0nor8" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456804229918' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851490890_vxxbogw6l', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851490890_vxxbogw6l" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803904896' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851491375_ecfschw1y', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851491375_ecfschw1y" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'send_message', messageId: 'msg_1754851492034_xnw0jezdh', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851492034_xnw0jezdh" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456804230058' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851492389_aepnohong', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851492389_aepnohong" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803904976' } 📲 极光推送通知已发送给用户 3 ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456804418390' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851493234_o2gl17ou0', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851493234_o2gl17ou0" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'send_message', messageId: 'msg_1754851493612_zt1q68zjb', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851493612_zt1q68zjb" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803227998' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851494387_i66x93aks', conversationId: 'c2c_2_3', to: '3', text: '😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851494387_i66x93aks" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803905110' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754851494948_l8kbebld6', conversationId: 'c2c_2_3', to: '3', text: '😀😀' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 😀😀 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "😀😀", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754851494948_l8kbebld6" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456804418515' } 📲 极光推送通知已发送给用户 3 ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803228093' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754851531233_1rth3thpy', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754851534.mp4?t=1754851534' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754851531233_1rth3thpy" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456803908999' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754852128189_ehv4siiqi', conversationId: 'c2c_2_3', to: '3', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_2_video_1754852131.mp4?t=1754852131' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852128189_ehv4siiqi" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456811898957' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754852208157_uk14hc5pi', conversationId: 'c2c_2_3', to: '3', text: '1' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 1 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "1", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852208157_uk14hc5pi" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456812498233' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754852431087_4ye8gpgc5', conversationId: 'c2c_2_3', to: '3', text: '好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852431087_4ye8gpgc5" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456815482338' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754852445822_30uptxlsm', conversationId: 'c2c_2_3', to: '3', text: '好好好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好好好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好好好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852445822_30uptxlsm" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456815149806' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754852448532_t4dpx51cp', conversationId: 'c2c_2_3', to: '3', text: '哈哈哈' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852448532_t4dpx51cp" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456815150032' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754852451271_fug4gzz64', conversationId: 'c2c_2_3', to: '3', text: '好好好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好好好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好好好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852451271_fug4gzz64" } } }, "options": { "time_to_live": 7200, "apns_production": false } } 收到消息: { type: 'heartbeat' } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456815735649' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754852454977_nhpewuv53', conversationId: 'c2c_2_3', to: '3', text: '呵呵呵' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 呵呵呵 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "呵呵呵", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852454977_nhpewuv53" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456815295428' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754852458307_6qvhi01ir', conversationId: 'c2c_2_3', to: '3', text: '哈哈哈哈哈哈哈' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈哈哈哈哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈哈哈哈哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852458307_6qvhi01ir" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456815736214' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754852464036_nxzd5rsmo', conversationId: 'c2c_2_3', to: '3', text: '胡明明ni' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 胡明明ni 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "胡明明ni", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852464036_nxzd5rsmo" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456815394106' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754852472765_jpmvaiaai', conversationId: 'c2c_2_3', to: '2', text: '不错' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 不错 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "不错", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754852472765_jpmvaiaai" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456815395075' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754852543461_cxf4m8kcs', conversationId: 'c2c_2_3', to: '3', text: '好好好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好好好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好好好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852543461_cxf4m8kcs" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456816582696' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754852562469_flx990ap8', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852562469_flx990ap8" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456817431223' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754852576972_tyhsukz3z', conversationId: 'c2c_2_3', to: '3', text: '不错' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 不错 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "不错", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754852576972_tyhsukz3z" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456816518788' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDg2MzUwNX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 用户 2 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 新的WebSocket连接 未认证用户断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754853514403_sxsn3r3l8', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MjM3NH0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754853514403_sxsn3r3l8', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754853514403_sxsn3r3l8" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456828578070' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754853527060_vg5hq57jv', conversationId: 'c2c_2_3', to: '3', text: '好' } 💬 消息已实时发送给在会话中的用户 3 🤔 判断用户 3 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754853527060_vg5hq57jv" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456828781335' } 📲 极光推送通知已发送给用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754853537572_dp9jtn68h', conversationId: 'c2c_2_3', to: '2', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_image_1754853539.jpg?t=1754853539' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754853537572_dp9jtn68h" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456828188285' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754853553535_ar468tbk4', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754853557.mp4?t=1754853557' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754853553535_ar468tbk4" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456828670375' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'heartbeat' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MjM3NH0=' } ✅ 用户 2 认证成功 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754853602482_ufjqti1ve', conversationId: 'c2c_2_3', to: '2', text: '[文件] numberdb2.bin (7) https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_file_1754853605.bin (7)?t=1754853605' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [文件] numberdb2.bin (7) https://gstikun.jkun.cf/ima... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[文件] numberdb2.bin (7) https://gstikun.jkun.cf/ima...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754853602482_ufjqti1ve" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456829667349' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754853623383_p0v4qnl4v', conversationId: 'c2c_2_3', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_3_3_video_1754853626.mp4?t=1754853626' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754853623383_p0v4qnl4v" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456829775029' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 心跳超时,断开连接 用户 3 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MjM3NH0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MjM3NH0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MjM3NH0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MjM3NH0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MjM3NH0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDg1NzQ4OX0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 用户 3 断开连接 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'send_message', messageId: 'msg_1754855058814_x23c87g8q', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754855058814_x23c87g8q', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MzkyMX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754855080573_7sdqkawth', conversationId: 'c2c_2_3', to: '3', text: '好' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: 好 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '好', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T19:44:39.867Z, timestamp: 1754855079867 } ✅ 离线消息已存储到MongoDB,ID: 6898f6a7ee6ed20d6b5b559d ✅ 离线消息已存储,消息ID: 6898f6a7ee6ed20d6b5b559d 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754855080573_7sdqkawth" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456847058653' } 📲 极光推送通知已发送给离线用户 3 收到消息: { type: 'send_message', messageId: 'msg_1754855058814_x23c87g8q', conversationId: 'c2c_2_3', to: '3', text: '哈哈' } 📴 用户 3 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 3: 哈哈 📦 MongoDB文档: { target_user_id: 3, conversation_id: 'c2c_2_3', message_content: '哈哈', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T19:44:42.558Z, timestamp: 1754855082558 } ✅ 离线消息已存储到MongoDB,ID: 6898f6aaee6ed20d6b5b559e ✅ 离线消息已存储,消息ID: 6898f6aaee6ed20d6b5b559e 📤 发送极光推送通知给 RegistrationID: 1a0018970b80dd79f52 📝 通知内容: 新消息 - 哈哈 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "1a0018970b80dd79f52" ] }, "notification": { "android": { "alert": "哈哈", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "2", "messageId": "msg_1754855058814_x23c87g8q" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456847197589' } 📲 极光推送通知已发送给离线用户 3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMyIsImV4cCI6MTc1NDk0NDAxNH0=' } ✅ 用户 3 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 2 条离线消息 for 用户 3 - 聊天消息: 2 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages' } 🗑️ 删除用户 3 的所有离线消息 ✅ 已删除 2 条离线消息 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 3 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 3 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 3 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 3 加入会话 c2c_2_3 收到消息: { type: 'send_message', messageId: 'msg_1754855171808_owgdggca4', conversationId: 'c2c_2_3', to: '2', text: '好好好' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 好好好 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "好好好", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_3", "senderId": "3", "messageId": "msg_1754855171808_owgdggca4" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456848427656' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 3 断开连接 用户 2 心跳超时,断开连接 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiNSIsImV4cCI6MTc1NDk0NDQ5MX0=' } ✅ 用户 5 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MzkyMX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754855745028_tk7xx6ror', conversationId: 'c2c_2_5', to: '5', text: 'heelo' } 📱 消息已实时发送给在线用户 5(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 5 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 5 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754855748961_szc2nqeu8', conversationId: 'c2c_2_5', to: '5', text: 'hello' } 📱 消息已实时发送给在线用户 5(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 5 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 5 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 📥 收到推送消息存储请求: { target_user_id: '2', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '5', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_5.jpg?t=1754858225' } } } 🔍 用户 2 在线 ✅ 推送消息已实时发送给用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'send_message', messageId: 'msg_1754855762737_9d5e3iv16', conversationId: 'c2c_2_5', to: '2', text: 'hello' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - hello 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "hello", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "5", "messageId": "msg_1754855762737_9d5e3iv16" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456854874365' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754855768717_h281xss4l', conversationId: 'c2c_2_5', to: '2', text: '👍👎👌✌️' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 👍👎👌✌️ 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "👍👎👌✌️", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "5", "messageId": "msg_1754855768717_h281xss4l" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456855087804' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754855774224_84i9oew0d', conversationId: 'c2c_2_5', to: '2', text: '😀😃😄😁😆😅😂' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - 😀😃😄😁😆😅😂 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "😀😃😄😁😆😅😂", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "5", "messageId": "msg_1754855774224_84i9oew0d" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456854875265' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754855783586_k81fye0pp', conversationId: 'c2c_2_5', to: '2', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_5_5_image_1754855783.jpg?t=1754855783' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "5", "messageId": "msg_1754855783586_k81fye0pp" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456854754564' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'send_message', messageId: 'msg_1754855790919_lbxvtdn70', conversationId: 'c2c_2_5', to: '5', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_5_2_image_1754855791.jpg?t=1754855791' } 💬 消息已实时发送给在会话中的用户 5 🤔 判断用户 5 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 5 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754855861677_4091wmfjl', conversationId: 'c2c_2_5', to: '2', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_5_5_image_1754855861.jpg?t=1754855861' } 📱 消息已实时发送给在线用户 2(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "5", "messageId": "msg_1754855861677_4091wmfjl" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456855891368' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754855875597_95swprwg8', conversationId: 'c2c_2_5', to: '5', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_5_2_image_1754855875.jpg?t=1754855875' } 💬 消息已实时发送给在会话中的用户 5 🤔 判断用户 5 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 5 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'send_message', messageId: 'msg_1754855883348_s5n8izf8e', conversationId: 'c2c_2_5', to: '2', text: '[图片] https://gstikun.jkun.cf/image/chat_media_c2c_2_5_5_image_1754855882.jpg?t=1754855882' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [图片] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[图片] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "5", "messageId": "msg_1754855883348_s5n8izf8e" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456855665495' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 ✅ 已删除 0 条离线消息 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'send_message', messageId: 'msg_1754855904722_mg9scxh4c', conversationId: 'c2c_2_5', to: '5', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_5_2_video_1754855907.mp4?t=1754855907' } 💬 消息已实时发送给在会话中的用户 5 🤔 判断用户 5 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 ⚠️ 用户 5 未注册极光推送RegistrationID,跳过推送 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 用户 5 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiNSIsImV4cCI6MTc1NDk0NDQ5MX0=' } ✅ 用户 5 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 5 -> RegistrationID 18071adc022cd6f2ec5 ✅ 极光推送RegistrationID已注册: 用户 5 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754855973008_ykwm2fsz2', conversationId: 'c2c_2_5', to: '5', text: '傻逼' } 💬 消息已实时发送给在会话中的用户 5 🤔 判断用户 5 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 18071adc022cd6f2ec5 📝 通知内容: 新消息 - 傻逼 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "18071adc022cd6f2ec5" ] }, "notification": { "android": { "alert": "傻逼", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "2", "messageId": "msg_1754855973008_ykwm2fsz2" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456857074076' } 📲 极光推送通知已发送给用户 5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754855982869_iq9bbbg7m', conversationId: 'c2c_2_5', to: '2', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_5_5_video_1754855983.mp4?t=1754855983' } 💬 消息已实时发送给在会话中的用户 2 🤔 判断用户 2 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 190e35f7e166c5393bf 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "190e35f7e166c5393bf" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "5", "messageId": "msg_1754855982869_iq9bbbg7m" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456857074993' } 📲 极光推送通知已发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754856012686_f2kozweqv', conversationId: 'c2c_2_5', to: '5', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_5_2_video_1754856016.mp4?t=1754856016' } 💬 消息已实时发送给在会话中的用户 5 🤔 判断用户 5 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 18071adc022cd6f2ec5 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "18071adc022cd6f2ec5" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "2", "messageId": "msg_1754856012686_f2kozweqv" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456857981256' } 📲 极光推送通知已发送给用户 5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 用户 5 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiNSIsImV4cCI6MTc1NDk0NDQ5MX0=' } ✅ 用户 5 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 5 -> RegistrationID 18071adc022cd6f2ec5 ✅ 极光推送RegistrationID已注册: 用户 5 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 用户 5 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiNSIsImV4cCI6MTc1NDk0NDQ5MX0=' } ✅ 用户 5 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 🎯 注册极光推送RegistrationID: 用户 5 -> RegistrationID 18071adc022cd6f2ec5 ✅ 极光推送RegistrationID已注册: 用户 5 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754856066730_e9oiy5f6c', conversationId: 'c2c_2_5', to: '5', text: '[视频] https://gstikun.jkun.cf/image/chat_media_c2c_2_5_2_video_1754856068.mp4?t=1754856068' } 💬 消息已实时发送给在会话中的用户 5 🤔 判断用户 5 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 18071adc022cd6f2ec5 📝 通知内容: 新消息 - [视频] https://gstikun.jkun.cf/image/chat_media_c2c_... 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "18071adc022cd6f2ec5" ] }, "notification": { "android": { "alert": "[视频] https://gstikun.jkun.cf/image/chat_media_c2c_...", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "2", "messageId": "msg_1754856066730_e9oiy5f6c" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456857986596' } 📲 极光推送通知已发送给用户 5 用户 5 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiNSIsImV4cCI6MTc1NDk0NDQ5MX0=' } ✅ 用户 5 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 用户 5 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiNSIsImV4cCI6MTc1NDk0NDQ5MX0=' } ✅ 用户 5 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 5 -> RegistrationID 18071adc022cd6f2ec5 ✅ 极光推送RegistrationID已注册: 用户 5 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 5 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 5 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 📥 收到推送消息存储请求: { target_user_id: '3', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } } } 🔍 用户 3 离线 📤 存储状态推送离线消息到MongoDB,用户 3: { messageType: 'push', messageSubtype: 'profile_update', messageData: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } } } 📦 状态推送MongoDB文档: { target_user_id: 3, message_category: 'push', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } }, sender_id: 2, priority: 2, created_at: 2025-08-10T20:02:30.964Z, timestamp: 1754856150964 } ✅ 状态推送离线消息已存储到MongoDB,ID: 6898fad6ee6ed20d6b5b559f ✅ 推送离线消息已存储,用户 3 📥 收到推送消息存储请求: { target_user_id: '5', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } } } 🔍 用户 5 在线 ✅ 推送消息已实时发送给用户 5 📥 收到推送消息存储请求: { target_user_id: '4', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } } } 🔍 用户 4 离线 📤 存储状态推送离线消息到MongoDB,用户 4: { messageType: 'push', messageSubtype: 'profile_update', messageData: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } } } 📦 状态推送MongoDB文档: { target_user_id: 4, message_category: 'push', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } }, sender_id: 2, priority: 2, created_at: 2025-08-10T20:02:30.973Z, timestamp: 1754856150973 } 📥 收到推送消息存储请求: { target_user_id: '1', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } } } 🔍 用户 1 离线 📤 存储状态推送离线消息到MongoDB,用户 1: { messageType: 'push', messageSubtype: 'profile_update', messageData: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } } } 📦 状态推送MongoDB文档: { target_user_id: 1, message_category: 'push', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858623' } }, sender_id: 2, priority: 2, created_at: 2025-08-10T20:02:30.973Z, timestamp: 1754856150973 } ✅ 状态推送离线消息已存储到MongoDB,ID: 6898fad6ee6ed20d6b5b55a0 ✅ 推送离线消息已存储,用户 4 ✅ 状态推送离线消息已存储到MongoDB,ID: 6898fad6ee6ed20d6b5b55a1 ✅ 推送离线消息已存储,用户 1 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 5 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 5 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 📥 收到推送消息存储请求: { target_user_id: '1', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } } } 🔍 用户 1 离线 📤 存储状态推送离线消息到MongoDB,用户 1: { messageType: 'push', messageSubtype: 'profile_update', messageData: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } } } 📦 状态推送MongoDB文档: { target_user_id: 1, message_category: 'push', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } }, sender_id: 2, priority: 2, created_at: 2025-08-10T20:02:59.257Z, timestamp: 1754856179257 } ✅ 状态推送离线消息已存储到MongoDB,ID: 6898faf3ee6ed20d6b5b55a2 ✅ 推送离线消息已存储,用户 1 📥 收到推送消息存储请求: { target_user_id: '3', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } } } 🔍 用户 3 离线 📤 存储状态推送离线消息到MongoDB,用户 3: { messageType: 'push', messageSubtype: 'profile_update', messageData: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } } } 📦 状态推送MongoDB文档: { target_user_id: 3, message_category: 'push', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } }, sender_id: 2, priority: 2, created_at: 2025-08-10T20:02:59.299Z, timestamp: 1754856179299 } ✅ 状态推送离线消息已存储到MongoDB,ID: 6898faf3ee6ed20d6b5b55a3 ✅ 推送离线消息已存储,用户 3 📥 收到推送消息存储请求: { target_user_id: '4', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } } } 🔍 用户 4 离线 📤 存储状态推送离线消息到MongoDB,用户 4: { messageType: 'push', messageSubtype: 'profile_update', messageData: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } } } 📦 状态推送MongoDB文档: { target_user_id: 4, message_category: 'push', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } }, sender_id: 2, priority: 2, created_at: 2025-08-10T20:02:59.305Z, timestamp: 1754856179305 } ✅ 状态推送离线消息已存储到MongoDB,ID: 6898faf3ee6ed20d6b5b55a4 ✅ 推送离线消息已存储,用户 4 📥 收到推送消息存储请求: { target_user_id: '5', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '2', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_2.jpg?t=1754858651' } } } 🔍 用户 5 在线 ✅ 推送消息已实时发送给用户 5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 📥 收到推送消息存储请求: { target_user_id: '2', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '5', changes: { avatar: 'https://aichat.134.w21.net/avatars/large/avatar_large_5.jpg?t=1754858678' } } } 🔍 用户 2 在线 ✅ 推送消息已实时发送给用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 📥 收到推送消息存储请求: { target_user_id: '2', message_type: 'push', message_subtype: 'profile_update', message_data: { user_id: '5', changes: { nickname: '郭郭' } } } 🔍 用户 2 在线 ✅ 推送消息已实时发送给用户 2 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'send_message', messageId: 'msg_1754856243203_meaih7gol', conversationId: 'c2c_2_5', to: '5', text: '。' } 📱 消息已实时发送给在线用户 5(不在会话中,由UnreadMessageManager处理) 🤔 判断用户 5 是否需要极光推送通知: - 用户在线状态: 在线 - 用户页面状态: undefined ✅ 用户在线但不在对应聊天界面,需要极光推送通知 📤 发送极光推送通知给 RegistrationID: 18071adc022cd6f2ec5 📝 通知内容: 新消息 - 。 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "18071adc022cd6f2ec5" ] }, "notification": { "android": { "alert": "。", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "2", "messageId": "msg_1754856243203_meaih7gol" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456860483890' } 📲 极光推送通知已发送给用户 5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 用户 5 断开连接 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MzkyMX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'heartbeat' } 用户 2 心跳超时,断开连接 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk0MzkyMX0=' } ✅ 用户 2 认证成功 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 🗑️ 删除用户 2 在会话 c2c_2_5 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 用户 2 加入会话 c2c_2_5 收到消息: { type: 'send_message', messageId: 'msg_1754863320502_9m2pb5uik', conversationId: 'c2c_2_5', to: '5', text: 'a' } 📴 用户 5 离线,存储到离线队列 📤 存储离线聊天消息到MongoDB,用户 5: a 📦 MongoDB文档: { target_user_id: 5, conversation_id: 'c2c_2_5', message_content: 'a', sender_id: 2, message_type: 'TEXT', created_at: 2025-08-10T22:02:00.222Z, timestamp: 1754863320222 } ✅ 离线消息已存储到MongoDB,ID: 689916d8ee6ed20d6b5b55a5 ✅ 离线消息已存储,消息ID: 689916d8ee6ed20d6b5b55a5 📤 发送极光推送通知给 RegistrationID: 18071adc022cd6f2ec5 📝 通知内容: 新消息 - a 📦 推送数据: { "platform": "android", "audience": { "registration_id": [ "18071adc022cd6f2ec5" ] }, "notification": { "android": { "alert": "a", "title": "新消息", "priority": 1, "category": "message", "style": 1, "alert_type": 7, "extras": { "type": "chat_message", "conversationId": "c2c_2_5", "senderId": "2", "messageId": "msg_1754863320502_9m2pb5uik" } } }, "options": { "time_to_live": 7200, "apns_production": false } } ✅ 极光推送通知发送成功 📊 推送结果: { sendno: '0', msg_id: '18102456947857763' } 📲 极光推送通知已发送给离线用户 5 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 收到消息: { type: 'heartbeat' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 🗑️ 删除用户 2 在会话 c2c_2_3 的离线消息 ✅ 已删除 0 条离线消息 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 用户 2 加入会话 c2c_2_3 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 用户 2 心跳超时,断开连接 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ✅ 用户 2 认证成功 收到消息: { type: 'get_offline_messages' } 📨 从MongoDB获取用户 2 的所有离线消息(聊天+推送) 📨 找到 0 条离线消息 for 用户 2 - 聊天消息: 0 条 - 推送消息: 0 条 用户 2 心跳超时,断开连接 用户 2 断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 收到消息: { type: 'get_offline_messages' } 未认证用户断开连接 🎯 注册极光推送RegistrationID: 用户 2 -> RegistrationID 190e35f7e166c5393bf ✅ 极光推送RegistrationID已注册: 用户 2 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'auth', token: 'eyJ1c2VyX2lkIjoiMiIsImV4cCI6MTc1NDk1MjE4Nn0=' } ⏰ token已过期 ❌ 用户认证失败,关闭连接 未认证用户断开连接 新的WebSocket连接 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'get_offline_messages' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_3' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_3' } 收到消息: { type: 'clear_offline_messages', conversationId: 'c2c_2_5' } 收到消息: { type: 'join_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 收到消息: { type: 'leave_conversation', conversationId: 'c2c_2_5' } 收到消息: { type: 'heartbeat' } 未认证用户断开连接 正在关闭服务器... MongoDB连接已关闭 服务器已关闭