From 32df7a4ce85824e0c73f1dbd06e2eada28c22893 Mon Sep 17 00:00:00 2001 From: MingxuanGame Date: Fri, 22 Aug 2025 12:40:22 +0000 Subject: [PATCH] fix(chat): missing greenlet when message is a command --- app/router/notification/message.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/router/notification/message.py b/app/router/notification/message.py index a323918..10fb6a3 100644 --- a/app/router/notification/message.py +++ b/app/router/notification/message.py @@ -90,6 +90,7 @@ async def send_message( channel_id = db_channel.channel_id channel_type = db_channel.type channel_name = db_channel.name + user_id = current_user.id # 使用 Redis 消息系统发送消息 - 立即返回 resp = await redis_message_system.send_message( @@ -114,7 +115,7 @@ async def send_message( message_id=resp.message_id, # 使用 Redis 系统生成的ID channel_id=channel_id, content=req.message, - sender_id=current_user.id, + sender_id=user_id, type=MessageType.ACTION if req.is_action else MessageType.PLAIN, uuid=req.uuid, )