Repository navigation
feat(telegram): add copy text button and raise telegram button limit to 10 - #1692
Merged
Merged
Conversation
…to 10 Add a `copyText` flow button type. Telegram sends it as a native inline `copy_text` button (Bot API 7.11), so a tap copies the text, e.g. a PIX "copia e cola" code from a variable. Other channels, and texts that resolve empty or longer than 256 characters, send a reply button whose tap answers with the text. Like a call button it cannot continue the flow and is rejected on quick replies, message templates and the WhatsApp Flow button. Telegram flows now take up to 10 buttons per message; past three buttons each one gets its own row. Flow specs accept `copy` on a send button. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The builder's button action list hides Copy Text unless the node's channel copies natively, so other channels no longer see it. A copy button already on another channel stays editable, and the schema still accepts it there (reply fallback). Shorten the text field hint to drop the PIX example. Co-Authored-By: Claude Opus 5.5 <[email protected]>
hello-jackytruong
referenced
this pull request
in hello-jackytruong/ChatWorkAI
Nov 22, 2026
…to 10 (#1692) * feat(telegram): add copy text button and raise telegram button limit to 10 Add a `copyText` flow button type. Telegram sends it as a native inline `copy_text` button (Bot API 7.11), so a tap copies the text, e.g. a PIX "copia e cola" code from a variable. Other channels, and texts that resolve empty or longer than 256 characters, send a reply button whose tap answers with the text. Like a call button it cannot continue the flow and is rejected on quick replies, message templates and the WhatsApp Flow button. Telegram flows now take up to 10 buttons per message; past three buttons each one gets its own row. Flow specs accept `copy` on a send button. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(telegram): offer the copy text button only on telegram nodes The builder's button action list hides Copy Text unless the node's channel copies natively, so other channels no longer see it. A copy button already on another channel stays editable, and the schema still accepts it there (reply fallback). Shorten the text field hint to drop the PIX example. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Deathgiver <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
copyText). On Telegram it goes out as a native inlinecopy_textbutton (Bot API 7.11): a tap copies the text to the contact's clipboard. A customer asked for this to let leads copy a PIX "copia e cola" payment code returned by a payment API ({{pix_code}}).How it behaves
copy_text. The bot is not told about the tap, so, like a Call Phone Number button, it cannot continue the flow or run steps (steps: max(0)).copyTextstep handler, which replies with the text (variables resolved again at tap time) so the contact can long-press to copy.warnlog. It is never dropped, so button counts stay equal.refineReplyOnlyButtons= call + copy).Changes
packages/flow-config:copyTextstep type and button type (steps/copy-text.ts: 256 for a literal, 1,000 for an expression with{{variables}}); Telegram policynativeButtonTypes: [copyText],buttonCount: 10;sendsAsNativeCopyButton(), the one check every encoder and the stored message use; flow speccopyfield on a send button (compiled likecall);buttonCopyTextUnsupportedvalidation code.packages/sdk:MessageButtonTemplategainsbuttonType: "copyText"(copyTextplus a replayablepostback).integrations/telegram:copy_texton step and stored buttons, plus the row layout.apps/worker: the stored message recordscopyTextonly when it was sent natively; the tap reply handler; a warning for texts that cannot be copied.apps/builder: "Copy Text" button action, offered only on Telegram nodes (offeredButtonsConfig; an existing copy button on another channel stays editable), with a variable-aware text field, a fallback hint, an icon on the canvas, hidden where it is rejected; the inbox renders a stored copy button that copies on click; i18n in all 21 locales.docs/flows.md; capabilitiesnativeButtonTypesdescription updated.Behavior change to note
Test plan
pnpm lint(incl.check:invariants, i18n check)pnpm check-types— 66/66copy_text+ fallback + layout, worker stored button + tap reply, public APIcopy, canvas icon)invariant-guardagent — no violations🤖 Generated with Claude Code