Quick Start
1
Start the bot β context is always on
2
Inspect the resolved quote programmatically
How It Works
The adapter resolves the referenced text inbound, thenprompt_text renders it above the new text before the message reaches the agent.
prompt_text whitespace-collapses the referenced text and truncates anything over 500 characters with an ellipsis. With no quote it is identical to the plain text.
Behavioural rules:
- Always-on. No YAML or Python flag β the feature is default behaviour on Telegram.
- Best-effort. Any missing field or error falls back to todayβs behaviour β the turn is never dropped just because resolution failed.
- Context, never control. Quoted content is injected as context only, never as a control frame β consistent with
allow_controlonBotMessage. - Runs behind the gate.
MESSAGE_RECEIVEDseescontent = prompt_text(the rendered turn including the quoted block). Redacting content in the hook is authoritative β the separately-resolved quote is cleared so unredacted quoted text canβt leak past. - Works in the standalone bot and the gateway. Both
praisonai botandpraisonai gatewayrenderprompt_textbefore dispatch.
Platform Support
Quoted reply resolution is wired on Telegram in this release.Common Patterns
Do nothing β it just works. Start the bot and reply/quote context is folded in automatically.MESSAGE_RECEIVED hook receives the rendered turn, so scrubbing event_data.content covers a secret that appeared in the quoted message, not just the new text.
msg.quoted in a custom hook or plugin. The resolved reference exposes the referenced text and its author.
Best Practices
Don't add prompt guidance for quotes
Don't add prompt guidance for quotes
The
[In reply to: "β¦"] block is unambiguous β the agent honours the referent without extra system-prompt scaffolding.Use the inbound gate to filter quoted content
Use the inbound gate to filter quoted content
MESSAGE_RECEIVED sees the rendered turn β redact or deny there, not by peeking at msg.quoted in the agent tools.Treat quoted content as untrusted
Treat quoted content as untrusted
It comes from whoever sent the referenced message. It is context, never a control frame.
Expect graceful degradation across Telegram clients
Expect graceful degradation across Telegram clients
If a client doesnβt send the
quote span, the adapter falls back to reply_to_message.text / caption; if neither is present, the turn goes through unchanged.Related
Implicit Mentions
The same reply gesture that admits the message under
mention_onlyInbound Message Gate
The hook sees the rendered turn, including the quoted block
Bot Gateway
Gateway agents render
prompt_text before dispatch tooControl Trust
Why quoted content is context, not control

