fix(telegram): reply to /start only in private chats #100

Merged
developer merged 1 commits from feature/telegram-private-reply-guard into development 2026-06-21 15:32:11 +00:00
Owner

Fix the BUTTON_TYPE_INVALID the main bot logged on group messages.

Since the bot became an admin in the moderated discussion group (and allowed_updates includes message), it receives the group's messages. Its default handler replied to every message with a Mini App launch button — an inline web_app button, which Telegram permits only in private chats — so a reply in the group failed with BUTTON_TYPE_INVALID. The failure is silent (the send is rejected, no message appears), which is why no error surfaced to users.

Now handleStart replies only in a private chat; in the group the bot only manages permissions. The promo bot gets the same guard. Tests cover private-replies and group-ignored for both bots.

Fix the `BUTTON_TYPE_INVALID` the main bot logged on group messages. Since the bot became an admin in the moderated discussion group (and `allowed_updates` includes `message`), it receives the group's messages. Its default handler replied to every message with a Mini App launch button — an **inline `web_app` button**, which Telegram permits **only in private chats** — so a reply in the group failed with `BUTTON_TYPE_INVALID`. The failure is silent (the send is rejected, no message appears), which is why no error surfaced to users. Now `handleStart` replies only in a **private** chat; in the group the bot only manages permissions. The promo bot gets the same guard. Tests cover private-replies and group-ignored for both bots.
developer added 1 commit 2026-06-21 15:28:19 +00:00
fix(telegram): reply to /start only in private chats
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 18s
CI / ui (pull_request) Has been skipped
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m7s
c494da553a
The main bot is now an admin in the moderated discussion group and receives its
messages (allowed_updates includes message). Its default handler replied to
every message with a Mini App launch button — an inline web_app button, which
Telegram permits only in private chats — so replying in the group failed with
BUTTON_TYPE_INVALID (silently: the send fails, no user-facing error). Reply only
in a private chat; in the group the bot only manages permissions. The promo bot
gets the same guard.
owner approved these changes 2026-06-21 15:28:59 +00:00
developer merged commit dec6fac013 into development 2026-06-21 15:32:11 +00:00
developer deleted branch feature/telegram-private-reply-guard 2026-06-21 15:32:11 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#100