This commit is contained in:
@@ -2,12 +2,6 @@ from resolvers.chats import create_chat, delete_chat, update_chat
|
||||
from resolvers.load import load_chats, load_messages_by, load_recipients
|
||||
from resolvers.messages import create_message, delete_message, mark_as_read, update_message
|
||||
from resolvers.search import search_messages, search_recipients
|
||||
from services.core import get_all_authors
|
||||
import asyncio
|
||||
|
||||
|
||||
print("[resolvers] init precache: getting all authors...")
|
||||
asyncio.create_task(get_all_authors())
|
||||
|
||||
__all__ = [
|
||||
# inbox
|
||||
|
@@ -116,7 +116,7 @@ async def load_recipients(_, _info, limit=50, offset=0):
|
||||
"""load possible chat participants"""
|
||||
onliners: List[int] = (await redis.execute("SMEMBERS", "authors-online")) or []
|
||||
r = []
|
||||
my_followings: List[ChatMember] = await get_my_followed()
|
||||
my_followings: List[ChatMember] = get_my_followed()
|
||||
if len(my_followings) < limit:
|
||||
my_followings = my_followings + list(authors_by_id.values())[offset : limit - len(my_followings)]
|
||||
my_followings = list(set(my_followings))
|
||||
|
Reference in New Issue
Block a user