following manager does not manage chats

This commit is contained in:
Untone 2023-10-16 17:50:40 +03:00
parent 0c75902a64
commit 34e6a03a89

View File

@ -22,7 +22,7 @@ class FollowingManager:
'author': [], 'author': [],
'topic': [], 'topic': [],
'shout': [], 'shout': [],
'chat': [] 'community': []
} }
@staticmethod @staticmethod
@ -39,11 +39,6 @@ class FollowingManager:
async def push(kind, payload): async def push(kind, payload):
try: try:
async with FollowingManager.lock: async with FollowingManager.lock:
if kind == 'chat':
for chat in FollowingManager['chat']:
if payload.message["chatId"] == chat.uid:
chat.queue.put_nowait(payload)
else:
for entity in FollowingManager[kind]: for entity in FollowingManager[kind]:
if payload.shout['createdBy'] == entity.uid: if payload.shout['createdBy'] == entity.uid:
entity.queue.put_nowait(payload) entity.queue.put_nowait(payload)