inbox-debug-3

This commit is contained in:
2024-01-24 13:06:47 +03:00
parent 6e8c084816
commit a83ef022a3
4 changed files with 17 additions and 15 deletions

View File

@@ -94,7 +94,7 @@ async def load_chats(_, info, limit: int = 50, offset: int = 0) -> Dict[str, Uni
member_ids = c["members"].copy()
c["members"] = []
for member_id in member_ids:
a = CacheStorage.authors_by_id.get(member_id)
a = CacheStorage.authors_by_id.get(str(member_id))
if a:
a["online"] = a.get("id") in members_online
c["members"].append(a)

View File

@@ -25,7 +25,7 @@ async def search_recipients(_, info, text: str, limit: int = 50, offset: int = 0
members_ids = await redis.execute("SMEMBERS", f"/chats/{chat_id}/members")
if isinstance(members_ids, set):
for member_id in members_ids:
author = CacheStorage.authors_by_id.get(member_id)
author = CacheStorage.authors_by_id.get(str(member_id))
if author:
if author["name"].startswith(text):
result.add(author)