perf(api,frontend): index hot queries, paginate chats, fix realtime
This commit is contained in:
1 parent
9d767d2531
commit
525ce024bc
27 files changed
+831
-268
No files matched your search
@@ -65,11 +65,16 @@ class EventHub:
|
||||
return
|
||||
account_id = event.get("account_id")
|
||||
chat_id = event.get("chat_id")
|
||||
scoped = event.get("kind") == "presence"
|
||||
targets = [
|
||||
sub
|
||||
for sub in self._subscribers
|
||||
if sub.account_id == account_id
|
||||
and (sub.chat_id is None or sub.chat_id == chat_id)
|
||||
and (
|
||||
sub.chat_id == chat_id
|
||||
if scoped
|
||||
else sub.chat_id is None or sub.chat_id == chat_id
|
||||
)
|
||||
]
|
||||
if not targets:
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user