This commit is contained in:
@@ -4,7 +4,7 @@ from typing import Any, Dict, List, Union
|
||||
|
||||
from resolvers.load import load_messages
|
||||
from services.auth import login_required
|
||||
from services.core import cached_authors
|
||||
from services.core import get_all_authors
|
||||
from services.rediscache import redis
|
||||
from services.schema import query
|
||||
|
||||
@@ -18,7 +18,8 @@ async def search_recipients(_, info, text: str, limit: int = 50, offset: int = 0
|
||||
|
||||
author_id = info.context["author_id"]
|
||||
|
||||
authors_by_user, authors_by_id = cached_authors
|
||||
authors = get_all_authors()
|
||||
authors_by_id = {a["id"]: a for a in authors}
|
||||
|
||||
existed_chats = await redis.execute("SMEMBERS", f"/chats_by_author/{author_id}")
|
||||
if existed_chats:
|
||||
|
Reference in New Issue
Block a user