fix(telegram): suppress NO_REPLY sentinel before sendMessageTelegram API call#68304
fix(telegram): suppress NO_REPLY sentinel before sendMessageTelegram API call#683041aifanatic wants to merge 2 commits intoopenclaw:mainfrom
Conversation
…API call sendMessageSlack already guards against silent reply tokens before calling the API. sendMessageTelegram was missing the same guard, so a NO_REPLY sentinel could reach the Telegram API and cause a visible flash of text (truncated to "NO") that gets deleted once the stream handler suppresses it. Add an isSilentReplyText check at the top of sendMessageTelegram — matching the existing Slack pattern — so NO_REPLY tokens are intercepted before any network call is made. Closes openclaw#38603
Greptile SummaryAdds the missing Confidence Score: 5/5Safe to merge — minimal, targeted fix with no behaviour change for normal messages. Single focused guard matching the proven Slack pattern; return type satisfies TelegramSendResult; no other opts bypass suppression; no tests broken. No files require special attention. Reviews (1): Last reviewed commit: "fix(telegram): suppress NO_REPLY sentine..." | Re-trigger Greptile |
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. Source inspection on current main shows a direct Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the narrow Telegram-owned guard with regression coverage and changelog after a clean rebase and redacted real behavior proof from a Telegram setup. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows a direct Is this the best way to solve the issue? Yes for the narrow adapter-defense gap. The latest patch preserves media and inline-button payloads like the Slack guard, but it still needs a current-main rebase and real behavior proof before merge. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 95a1c915312a. Re-review progress:
|
Summary
sendMessageSlackguards againstNO_REPLYsentinel tokens before calling the Slack APIsendMessageTelegramwas missing the same guard — aNO_REPLYtoken could reach the Telegram APIChange Type
Scope
Linked Issue/PR
Root Cause
When an agent outputs visible narration text before the
NO_REPLYsentinel in the same response, the text streams to Telegram as a live preview. OpenClaw's stream handler correctly suppressesNO_REPLYat the end, but the preview was already delivered.sendMessageSlackhas a defensive guard that interceptsNO_REPLYtokens before any API call;sendMessageTelegramlacked this guard.Fix
Added
isSilentReplyTextcheck at the entry ofsendMessageTelegram, matching the existing Slack pattern. Returns a suppressed no-op result without making a network call when the text is aNO_REPLYsentinel and no media is attached.