unread-fix3
All checks were successful
deploy / deploy (push) Successful in 27s

This commit is contained in:
Untone 2023-10-16 19:13:39 +03:00
parent 49423ffb93
commit b03ac825b6

View File

@ -12,6 +12,6 @@ async def get_total_unread_counter(author_id: int) -> int:
chats_set = await redis.execute("SMEMBERS", f"chats_by_author/{author_id}") chats_set = await redis.execute("SMEMBERS", f"chats_by_author/{author_id}")
unread = 0 unread = 0
for chat_id in list(chats_set): for chat_id in list(chats_set):
n = await get_unread_counter(chat_id.decode("utf-8"), author_id) n = await get_unread_counter(chat_id, author_id)
unread += n unread += n
return unread return unread