nodecode
This commit is contained in:
parent
66852a56c4
commit
3e1fd78ebe
|
@ -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"""
|
"""load :limit messages of :chat_id with :offset"""
|
||||||
author_id = info.context["author_id"]
|
author_id = info.context["author_id"]
|
||||||
user_chats = (await redis.execute("SMEMBERS", "chats_by_author/" + str(author_id))) or []
|
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:
|
if user_chats:
|
||||||
messages = []
|
messages = []
|
||||||
by_chat = by.get("chat")
|
by_chat = by.get("chat")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user