Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix: skip sendRichMessage when streaming preview exists (#4470)
axelray-dev160cec239676
diff --git a/nanobot/channels/telegram.py b/nanobot/channels/telegram.pyindex 85a0facc4..8ce7641a9 100644--- a/nanobot/channels/telegram.py+++ b/nanobot/channels/telegram.py@@ -907,8 +907,11 @@ class TelegramChannel(BaseChannel):thread_kwargs["message_thread_id"] = message_thread_idraw_text = buf.text- # Try sendRichMessage for final output (Bot API 10.1)- if not getattr(self, "_rich_send_disabled", False):+ # Try sendRichMessage for final output (Bot API 10.1).+ # Skip when a streaming preview already exists to avoid the+ # delete-and-resend pattern that causes flickering and drops+ # line breaks (issue #4470).+ if not buf.message_id and not getattr(self, "_rich_send_disabled", False):reply_params = Noneif reply_to_message_id := meta.get("message_id"):reply_params = {"message_id": int(reply_to_message_id), "allow_sending_without_reply": True}