From 1be48cc6fda80f28b1bf742415a7b4b29f3887fb Mon Sep 17 00:00:00 2001 From: Daniil Svetlov Date: Tue, 31 Mar 2026 18:25:34 +0300 Subject: [PATCH] feat: show unread mentions count in list_chats output Display unread_mentions_count for each chat when it is greater than zero. The value is already available on the dialog object from Telegram API, so this adds no extra API calls. Co-Authored-By: Claude Opus 4.6 (1M context) --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 8a283f8..5046e86 100644 --- a/main.py +++ b/main.py @@ -1323,6 +1323,11 @@ async def list_chats(chat_type: str = None, limit: int = 20) -> str: else: chat_info += ", No unread messages" + # Add unread mentions count if available + unread_mentions = getattr(dialog, "unread_mentions_count", 0) or 0 + if unread_mentions > 0: + chat_info += f", Unread mentions: {unread_mentions}" + results.append(chat_info) if not results: