From fe8dcb3797c4ad4129de0ea0f3ef096a631016d0 Mon Sep 17 00:00:00 2001 From: Bayram Annakov Date: Fri, 26 Dec 2025 13:46:53 -0800 Subject: [PATCH] Update main.py Co-authored-by: Eugene Evstafev <36392751+chigwell@users.noreply.github.com> --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 3c8992c..965b275 100644 --- a/main.py +++ b/main.py @@ -940,7 +940,7 @@ async def list_chats(chat_type: str = None, limit: int = 20) -> str: chat_info += f", Username: @{entity.username}" # Add unread count if available - unread_count = getattr(dialog, "unread_count", 0) + unread_count = getattr(dialog, "unread_count", 0) or 0 # Also check unread_mark (manual "mark as unread" flag) inner_dialog = getattr(dialog, "dialog", None) unread_mark = (