unread-counter-fix-2

This commit is contained in:
Untone 2023-10-13 15:20:06 +03:00
parent f86da630e8
commit 6047a3b259

View File

@ -7,8 +7,7 @@ async def get_unread_counter(chat_id: str, author_id: int):
unread = await redis.execute(
"LLEN", f"chats/{chat_id}/unread/{author_id}"
)
if unread:
return unread
return unread or 0
except Exception:
return 0