JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix:接了飞书channel后日志里一直打印“消息内容为空,跳过发送”
chunbs_cbsee793d017846
diff --git a/jiuwenswarm/gateway/channel_manager/im_platforms/feishu/feishu_connect.py b/jiuwenswarm/gateway/channel_manager/im_platforms/feishu/feishu_connect.pyindex a484bd4f91..930f1f7861 100644--- a/jiuwenswarm/gateway/channel_manager/im_platforms/feishu/feishu_connect.py+++ b/jiuwenswarm/gateway/channel_manager/im_platforms/feishu/feishu_connect.py@@ -1566,7 +1566,11 @@ class FeishuChannel(BaseChannel):route_mention_member_ids = list(routing_target.mention_member_ids or [])route_mention_all = routing_target.mention_all- # 跳过 reasoning 信息+ # 跳过 keepalive 心跳消息 — 仅用于 WebSocket 连接保活,无需投递到飞书+ if event_name == "keepalive":+ return++ # 跳过 reasoning 信息if msg.event_type == EventType.CHAT_REASONING:returndiff --git a/jiuwenswarm/gateway/message_handler/message_handler.py b/jiuwenswarm/gateway/message_handler/message_handler.pyindex 32ac28038c..0ab71d3b74 100644--- a/jiuwenswarm/gateway/message_handler/message_handler.py+++ b/jiuwenswarm/gateway/message_handler/message_handler.py@@ -2857,10 +2857,15 @@ class MessageHandler(ABC):) -> bool:"""Publish one AgentServer stream chunk (evolution + robot_messages).- Returns False when the chunk is a terminal stream sentinel.+ Returns False when the chunk should not be forwarded to robot_messages+ (terminal sentinel or filtered control message like keepalive)."""if self._is_terminal_stream_chunk(chunk):return False+ # 跳过 keepalive chunk — 仅用于 WebSocket 保活,不投递到 IM 通道+ payload = getattr(chunk, "payload", None)+ if isinstance(payload, dict) and payload.get("event_type") == "keepalive":+ return Falseif not await self._handle_evolution_chunk(chunk, session_id, request_metadata):return Falseout = self._chunk_to_message(