mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 16:07:01 +08:00
feat(telegram): support rich Agent messages
This commit is contained in:
@@ -2395,6 +2395,12 @@ class MoviePilotAgent:
|
||||
发送 Agent 消息;后台任务不绑定原渠道,交由通知链广播。
|
||||
"""
|
||||
broadcast = self.is_background
|
||||
rich_message = (
|
||||
message
|
||||
if not broadcast
|
||||
and self.channel == NotificationChannel.Telegram.value
|
||||
else None
|
||||
)
|
||||
self._save_assistant_display_message_once(message)
|
||||
await AgentChain().async_post_message(
|
||||
Message(
|
||||
@@ -2407,6 +2413,7 @@ class MoviePilotAgent:
|
||||
original_chat_id=None if broadcast else self.original_chat_id,
|
||||
title=title,
|
||||
text=message,
|
||||
rich_message=rich_message,
|
||||
save_history=False,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user