Update main.py

Co-authored-by: Eugene Evstafev <36392751+chigwell@users.noreply.github.com>
This commit is contained in:
Bayram Annakov 2025-12-26 13:46:31 -08:00 committed by GitHub
parent 943f66a67c
commit 78a21ef2d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -944,7 +944,7 @@ async def list_chats(chat_type: str = None, limit: int = 20) -> str:
# Also check unread_mark (manual "mark as unread" flag) # Also check unread_mark (manual "mark as unread" flag)
inner_dialog = getattr(dialog, "dialog", None) inner_dialog = getattr(dialog, "dialog", None)
unread_mark = ( unread_mark = (
getattr(dialog.dialog, "unread_mark", False) getattr(inner_dialog, "unread_mark", False))
if hasattr(dialog, "dialog") if hasattr(dialog, "dialog")
else False else False
) )