




























@@ -0,0 +1,37 @@
1+# Telegram Maintainer Decisions
2+3+Use this page during Telegram PR review. These are intentional maintainer decisions, not incidental implementation details.
4+5+Verified against Telegram Bot API 10.0, May 8 2026.
6+7+## Streaming
8+9+- Do not reintroduce `sendMessageDraft` for answer streaming. Telegram drafts are ephemeral 30-second previews in private chats; final delivery still requires a separate `sendMessage`. OpenClaw uses `sendMessage` plus `editMessageText`, then finalizes in place so the user sees one persistent answer.
10+- Streaming owns one visible preview message. Edit it forward. Do not send an extra final bubble unless the final edit genuinely failed.
11+- Keep the first-preview debounce. If a provider sends token-sized deltas, coalesce them into cumulative preview text instead of removing the debounce.
12+- Respect Telegram limits in the Telegram layer. Text over 4096 chars chains into continuation messages. Polls keep the current Bot API 12-option cap.
13+14+## Telegram API Ownership
15+16+- Prefer grammY primitives and Telegram-native helpers when they model the behavior directly. Avoid custom Bot API wrappers for behavior grammY already owns.
17+- Throttling is bot-token scoped. All Telegram API clients for the same token share one grammY `apiThrottler()` instance.
18+- Do not silently retry failed topic sends without topic metadata. A wrong-surface success is worse than a loud Telegram error.
19+- DM topics and forum topics are distinct. `direct_messages_topic_id` and `message_thread_id` are not interchangeable.
20+21+## Context And Authorization
22+23+- Reply context comes from OpenClaw-observed messages. Bot API updates expose `reply_to_message`, but there is no arbitrary `getMessage(chat, id)` hydration path later.
24+- Current local chat context must outrank stale reply ancestry in the prompt. Old replied-to messages should not look like the active conversation.
25+- Pairing is DM-only. Group and topic authorization need explicit config allowlists.
26+- Telegram allowlists use numeric sender IDs. Usernames are optional, mutable, and not a reliable arbitrary-user lookup key in the Bot API.
27+- Group and channel visible replies are policy-controlled. Normal room replies stay private unless `messages.groupChat.visibleReplies: "automatic"` is set or the agent explicitly calls `message.send`.
28+29+## Interactive Surfaces
30+31+- Native callbacks stay structured. Approval, native command, plugin, select, and multiselect callbacks must not fall through as raw callback text.
32+- Preserve callback values exactly, including delimiters such as `env|prod`.
33+- Native slash commands should remain fast-pathable before full workspace and agent-turn setup.
34+35+## Review Standard
36+37+Telegram behavior PRs need real Telegram proof when they touch transport, streaming, topics, callbacks, authorization, or reply context. Prefer the bot-to-bot QA lane or an equivalent live Telegram probe over synthetic-only validation.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。