Skip to content

fix(backend): save Telegram rich messages as notes - #335

Merged
CarlosLugones merged 5 commits into
developfrom
fix/telegram-rich-messages
Dec 3, 2026
Merged

CarlosLugones merged 5 commits into
developfrom
fix/telegram-rich-messages

Conversation

@CarlosLugones

@CarlosLugones CarlosLugones commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Refs #337

What changes

Some text messages sent to the Telegram bot were refused with "BrainBro can't keep this kind of message." Telegram sends messages with headings, lists or tables as rich messages: their content comes in rich_message, with no text, and the bot only read text.

They now become notes in Markdown (apps/telegram/rich.py):

  • Headings, lists, tables, quotes, code and links keep their formatting, and line breaks are kept.
  • Photos go inside the note, stored like pasted ones.
  • Other files (PDFs, videos, audio) become items of their own in the inbox, and the note names them. One over the size limit stays on Telegram and the note says so, without losing the rest of the message.
  • A rich message with only a URL becomes a link, like any other message.

Also changes the commit format in CONTRIBUTING.md: the issue now goes in the body (ref #123), not in the subject.

Verification

  • Relevant automated tests pass (the whole backend suite)
  • Lint and type checks pass (ruff; no frontend changes)
  • User-facing behavior was verified: not yet tried with a real message sent to the bot

@CarlosLugones CarlosLugones self-assigned this Dec 3, 2026
@CarlosLugones
CarlosLugones force-pushed the fix/telegram-rich-messages branch from 3fe3419 to bfe6c8c Compare December 3, 2026 04:06
@CarlosLugones
CarlosLugones force-pushed the fix/telegram-rich-messages branch from bfe6c8c to c01e57b Compare December 3, 2026 04:10
@CarlosLugones
CarlosLugones merged commit 97e76b3 into develop Dec 3, 2026
12 checks passed
@CarlosLugones
CarlosLugones deleted the fix/telegram-rich-messages branch December 3, 2026 04:13
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