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) <noreply@anthropic.com>
This commit is contained in:
Daniil Svetlov 2026-03-31 18:25:34 +03:00
parent 71cdefa55c
commit 1be48cc6fd

View file

@ -1323,6 +1323,11 @@ async def list_chats(chat_type: str = None, limit: int = 20) -> str:
else: else:
chat_info += ", No unread messages" 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) results.append(chat_info)
if not results: if not results: