Skip to content

Conversation

@BayramAnnakov
Copy link
Contributor

Summary

Fixes list_chats to detect chats that were manually marked as unread via Telegram's "mark as unread" feature.

Problem

Previously list_chats only checked dialog.unread_count, which misses chats marked unread manually. These chats appear in Telegram's "Unread" folder but were not reported by the MCP.

Solution

Now also checks dialog.dialog.unread_mark flag:

  • unread_count > 0: shows "Unread: N" (existing behavior)
  • unread_mark = True: shows "Unread: marked" (new)

Test Plan

  • Tested with chats having unread_count > 0
  • Tested with chats having unread_mark = True
  • Verified output matches Telegram's Unread folder
  • Code passes black formatting
  • Code passes flake8 linting

Generated with Claude Code

Previously list_chats only checked dialog.unread_count, missing chats
that were manually marked as unread via Telegram's "mark as unread" feature.

Now also checks dialog.dialog.unread_mark flag:
- unread_count > 0: shows "Unread: N"
- unread_mark = True: shows "Unread: marked"

This matches the behavior of Telegram's "Unread" folder filter.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@BayramAnnakov BayramAnnakov force-pushed the fix/unread-mark-detection branch from 21e1ed6 to 6b1f4cd Compare December 26, 2025 21:44
BayramAnnakov and others added 10 commits December 26, 2025 13:45
Co-authored-by: Eugene Evstafev <[email protected]>
Co-authored-by: Eugene Evstafev <[email protected]>
Co-authored-by: Eugene Evstafev <[email protected]>
Co-authored-by: Eugene Evstafev <[email protected]>
Co-authored-by: Eugene Evstafev <[email protected]>
Co-authored-by: Eugene Evstafev <[email protected]>
Co-authored-by: Eugene Evstafev <[email protected]>
The individual line suggestions created invalid Python when applied
separately. Combined the ternary expression properly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@chigwell chigwell merged commit ff8d19b into chigwell:main Dec 26, 2025
3 checks 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