perf(api,frontend): index hot queries, paginate chats, fix realtime

This commit is contained in:
hh committed 2026-08-06 01:52:41 +02:00
1 parent 9d767d2531
commit 525ce024bc
27 files changed
+831 -268

No files matched your search

+6 -1
View File
@@ -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