Files
Diego Sánchez dc6519da4a fix(telegram): let a silence marker stand on group messages not addressed to the bot
The Telegram adapter never set MessageEvent.reply_expected, so silence_allowed()
always saw None and every bare [SILENT] / NO_REPLY on a group message became the
"returned only a silence marker" notice, posted to the whole group (#120051).

group_reply_expected (telegram_context.py) sets the per-message signal from #123271,
with the same rule the WhatsApp adapter gets in #133672:
- True for DMs and for a group message addressed to this bot: @mention, reply to
  the bot, wake word (mention_patterns) or /command, in text or a caption. The
  #110952 fallback stays.
- False for a group message addressed to someone else (a reply to another member,
  or one that opens by @mentioning someone else) and for plain chatter. A forum
  topic's root anchor is not a reply to a person.
- None for channel posts, an unknown bot identity, and an unaddressed message with
  a "?", which may be a question for the bot.

Photo bursts and albums merge through absorb_reply_expected, so a batch that
includes a photo addressed to the bot stays True.
2026-10-31 15:33:49 +05:30

3 lines
76 B
Plaintext

diegoasanch
# PR: fix(telegram) reply_expected for group messages (#120051)