Skip to content

Add /muted command and muted chat digest button - #5

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/muted-digest-command-6ce3
Jun 18, 2026
Merged

Add /muted command and muted chat digest button#5
cursor[bot] merged 1 commit into
mainfrom
cursor/muted-digest-command-6ce3

Conversation

@erop39

@erop39 erop39 commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

Adds support for reading buffered messages from muted Max chats via /muted (alias /readmuted) and an inline 📭 Заглушённые button.

What changed

  • MUTED_DIGEST_ENABLED=true — enables muted-chat buffering and Telegram polling for digest commands (even when REPLY_ENABLED=false)
  • Messages from muted Max chats are stored in an in-memory buffer instead of being silently dropped
  • /muted or /readmuted — flushes buffered messages grouped by chat
  • 📭 Заглушённые button appears on startup/reconnect notifications when digest mode is enabled
  • Buffer is pruned when messages are read in Max (via read marks)

New files

  • app/muted_buffer.py — in-memory message buffer grouped by chat
  • app/muted_digest.py — flush logic for buffered muted messages
  • Tests for buffer, digest, and handler integration

How to enable

Add to .env:

MUTED_DIGEST_ENABLED=true

Optionally also set SKIP_MUTED=true (digest mode automatically enables skip-muted behavior).

Register /muted in BotFather if desired — the handler is now registered in code.

Testing

  • All 227 tests pass, including new tests for muted buffer/digest/handlers
Open in Web Open in Cursor 

Co-authored-by: eGoR <erop39@users.noreply.github.com>
@cursor
cursor Bot merged commit 0233b48 into main Jun 18, 2026
1 check passed
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.

2 participants