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:
parent
71cdefa55c
commit
1be48cc6fd
1 changed files with 5 additions and 0 deletions
5
main.py
5
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue