Skip to content

Ask for a Telegram reply box only in a group chat - #25

Merged
neotechnet merged 1 commit into
stack/installed-0.3.5from
fix/telegram-direct-no-force-reply
Nov 15, 2026
Merged

neotechnet merged 1 commit into
stack/installed-0.3.5from
fix/telegram-direct-no-force-reply

Conversation

@neotechnet

Copy link
Copy Markdown
Owner

Job: telegram-force-reply-20261115 (Igor).

What changes

Tapping "Type my own answer" on a Telegram card sent a force_reply prompt in every chat. In Steve's direct chat that made each typed answer arrive threaded under "Reply to message".

armTyped now asks for the reply box only when chat.kind === 'group'. A direct chat gets the same prompt text with no reply control.

Why it is safe

  • In onMessage, the gate msg.chat.kind === 'group' && !msg.mentioned runs before the armed check, so in a direct chat the armed map alone matches the answer.
  • In a group that gate would drop an unaddressed answer. The Telegram adapter counts a reply to the bot as mentioned (platforms/telegram.js around line 125), so force_reply stays load-bearing there and is kept.
  • The Telegram sender only adds reply_markup.force_reply when forceReply === true, so false sends a plain message.

Tests

  • The direct-chat case now asserts the prompt text and forceReply: false, and still proves the typed text answers the card.
  • New group case: the card reaches a bound group, the arm sends forceReply: true there, and the group reply answers the card.
  • The second-arm test now counts prompts by their text rather than by forceReply.
  • Negative control: with the old line restored, the direct-chat test fails.

Changelog: In a direct Telegram chat, typing your own answer to a card no longer threads it under "Reply to message".

Tapping the typed-answer button sent a force_reply prompt in every chat, so in a direct chat each typed answer arrived threaded under 'Reply to message'. A direct chat never needs it: the armed map alone matches the next text. A group still does, because an unaddressed message is dropped before the armed check and a reply to the bot counts as addressed.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T13:21:12.344485Z 999f59c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@neotechnet
neotechnet merged commit 8562961 into stack/installed-0.3.5 Nov 15, 2026
14 checks passed
@neotechnet
neotechnet deleted the fix/telegram-direct-no-force-reply branch November 15, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant