Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bot/vikingbot/agent/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ async def check_long_running():
await self.sessions.save(session)
return OutboundMessage(
session_key=msg.session_key,
content=None,
content="",
metadata=msg.metadata,
event_type=OutboundEventType.NO_REPLY,
)
Expand Down
2 changes: 2 additions & 0 deletions bot/vikingbot/channels/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ async def _handle_message(
sender_id: str,
chat_id: str,
content: str,
need_reply: bool = True,
media: list[str] | None = None,
metadata: dict[str, Any] | None = None,
) -> None:
Expand Down Expand Up @@ -174,6 +175,7 @@ async def _handle_message(
chat_id=chat_id,
),
sender_id=str(sender_id),
need_reply=need_reply,
content=content,
media=media or [],
metadata=metadata or {},
Expand Down
5 changes: 2 additions & 3 deletions bot/vikingbot/channels/feishu.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,12 +809,10 @@ async def _on_message(self, data: "P2ImMessageReceiveV1") -> None:

# 6. 检查是否需要处理该消息
should_process = await self._check_should_process(chat_type, chat_id, message, is_mentioned)
if not should_process:
return

# 7. 添加已读表情
config = load_config()
if config.mode != BotMode.DEBUG:
if config.mode != BotMode.DEBUG and should_process:
await self._add_reaction(message_id, "MeMeMe")

# 8. 处理@占位符
Expand All @@ -840,6 +838,7 @@ async def _on_message(self, data: "P2ImMessageReceiveV1") -> None:
chat_id=final_chat_id,
content=content,
media=media if media else None,
need_reply=should_process,
metadata={
"message_id": message_id,
"chat_type": chat_type,
Expand Down
Loading