Skip to content

Stop truncating long Telegram replies in format_response#172

Open
serxa wants to merge 1 commit into
mainfrom
serxa/telegram-no-truncate-long-replies
Open

Stop truncating long Telegram replies in format_response#172
serxa wants to merge 1 commit into
mainfrom
serxa/telegram-no-truncate-long-replies

Conversation

@serxa

@serxa serxa commented Jul 7, 2026

Copy link
Copy Markdown
Member

Problem

format_response() truncated any reply longer than MAX_MSG_LEN, appending a "... (truncated)" marker. But send() already splits outgoing text into MAX_MSG_LEN-sized chunks and delivers them as sequential messages — so the truncation ran first and permanently dropped the tail of long replies.

How

Return the text unchanged from format_response() and let send() do the chunking, so long replies are delivered in full across multiple messages.

Notes

Independent of #171 (touches a different region of the same file; no conflict). No Telegram/channel tests in the suite.

@serxa serxa changed the title telegram: stop truncating long replies in format_response Stop truncating long Telegram replies in format_response Jul 7, 2026
format_response() truncated any text over MAX_MSG_LEN and appended a
"... (truncated)" marker. But send() already splits outgoing text into
MAX_MSG_LEN-sized chunks delivered as sequential messages, so truncating
first permanently dropped the tail of long replies.

Return the text unchanged and let send() handle chunking.
@serxa serxa force-pushed the serxa/telegram-no-truncate-long-replies branch from ef9f823 to 801614a Compare July 7, 2026 23:39
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