mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 01:04:49 -04:00
Don't bother checking for updates if the stream token hasn't advanced for a user
This commit is contained in:
parent
cffe6057fb
commit
63878c0379
12 changed files with 123 additions and 55 deletions
|
@ -345,6 +345,8 @@ class PresenceHandler(BaseHandler):
|
|||
curr_users = yield rm_handler.get_room_members(room_id)
|
||||
|
||||
for local_user in [c for c in curr_users if self.hs.is_mine(c)]:
|
||||
statuscache = self._get_or_offline_usercache(local_user)
|
||||
statuscache.update({}, serial=self._user_cachemap_latest_serial)
|
||||
self.push_update_to_local_and_remote(
|
||||
observed_user=local_user,
|
||||
users_to_push=[user],
|
||||
|
@ -820,6 +822,8 @@ class PresenceHandler(BaseHandler):
|
|||
room_ids=[], statuscache=None):
|
||||
with PreserveLoggingContext():
|
||||
self.notifier.on_new_user_event(
|
||||
"presence_key",
|
||||
self._user_cachemap_latest_serial,
|
||||
users_to_push,
|
||||
room_ids,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue