mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-02 17:32:39 +00:00
Merge pull request #926: fix(agent): skip empty fallback outbound for non-cli channels
This commit is contained in:
commit
f89f8a972c
@ -240,9 +240,12 @@ class AgentLoop:
|
||||
)
|
||||
try:
|
||||
response = await self._process_message(msg)
|
||||
await self.bus.publish_outbound(response or OutboundMessage(
|
||||
channel=msg.channel, chat_id=msg.chat_id, content="",
|
||||
))
|
||||
if response is not None:
|
||||
await self.bus.publish_outbound(response)
|
||||
elif msg.channel == "cli":
|
||||
await self.bus.publish_outbound(OutboundMessage(
|
||||
channel=msg.channel, chat_id=msg.chat_id, content="", metadata=msg.metadata or {},
|
||||
))
|
||||
except Exception as e:
|
||||
logger.error("Error processing message: {}", e)
|
||||
await self.bus.publish_outbound(OutboundMessage(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user