This commit is contained in:
Untone 2023-10-13 20:32:51 +03:00
parent 66852a56c4
commit 3e1fd78ebe

View File

@ -81,7 +81,7 @@ async def load_messages_by(_, info, by, limit: int = 10, offset: int = 0):
"""load :limit messages of :chat_id with :offset"""
author_id = info.context["author_id"]
user_chats = (await redis.execute("SMEMBERS", "chats_by_author/" + str(author_id))) or []
user_chats = [c.decode() for c in user_chats]
user_chats = [c for c in user_chats]
if user_chats:
messages = []
by_chat = by.get("chat")