fix(channels): preserve explicit compaction feedback and silent delivery
This commit is contained in:
1 parent
0b402d0414
commit
7644d845b4
13 files changed
+96
-37
No files matched your search
@@ -1058,6 +1058,8 @@ class TelegramChannel(BaseChannel):
|
||||
|
||||
async def send(self, msg: OutboundMessage) -> None:
|
||||
"""Send a message through Telegram."""
|
||||
if isinstance(msg.event, ContextCompactionEvent) and not msg.event.notify:
|
||||
return
|
||||
app = await self._wait_for_app()
|
||||
if app is None:
|
||||
self.logger.warning("bot not running")
|
||||
@@ -1096,8 +1098,6 @@ class TelegramChannel(BaseChannel):
|
||||
# Compaction notices collapse into one message: the started phase sends
|
||||
# it, a terminal phase edits it in place instead of posting a new one.
|
||||
if isinstance(msg.event, ContextCompactionEvent):
|
||||
if not msg.event.notify:
|
||||
return
|
||||
await self._send_compaction_notice(
|
||||
chat_id, msg, msg.event, reply_params, thread_kwargs,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user