Skip to content

fix(telegram): a tapped follow-up is echoed as a bot message instead of recording the pick on the suggestion block #844

Description

@adolfousier

Tapping a suggestion under "💡 Suggested next:" posts a new message from the bot containing the chosen text. It carries the bot's name, avatar and admin badge, so a continuation the user chose reads as the bot saying it.

The turn itself is correct: the tapped suggestion runs as a real turn with tools and answers normally. Only the attribution is wrong.

Prior attempt

#787 added a > ▶️ quote prefix to the echo, on the reasoning that quoting would make it "read as the user's pick rather than the bot's own statement". It does not. Quote formatting sits inside a bubble that is still labelled with the bot's identity, so the attribution is unchanged.

Constraint

The Bot API has no send-as-user. A bubble attributed to the user is not achievable, and any fix that keeps posting a new bot message will keep reading as the bot speaking.

Fix

Stop emitting a second message. Record the pick on the suggestion block that already exists by editing it in place and dropping the keyboard:

💡 Suggested next:        ->   ▶️ Update the SKILL.md with the new routing
[ option A ]
[ option B ]
[ option C ]

That reads as a selected control rather than an utterance, and it removes the duplicate bubble entirely.

It also fixes a second problem visible in the same flow: take_pending_followup removes the whole option set on the first tap, so the remaining buttons stay on screen but are dead. Tapping one logs no pending followup for session ... (stash empty) and does nothing. Editing the message clears them at the moment they stop working.

Fall back to the current quoted echo if the edit fails (message too old or inaccessible), so the record of the choice is never lost silently.

Impact

  • A user-chosen continuation is attributed to the bot
  • Stale buttons remain tappable after the set is consumed
  • The chat carries a duplicate of text already shown on the button

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions