diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-12-03 19:06:24 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-12-03 19:06:24 +0000 |
commit | 52f1d3c886abacda06c18deab5b76a1c7f6d99ca (patch) | |
tree | 5f66da0e428aeaadb64edc5f5bc83504d44f0174 /synapse/handlers/presence.py | |
parent | Merge branch 'release-v0.5.4' of github.com:matrix-org/synapse into develop (diff) | |
download | synapse-52f1d3c886abacda06c18deab5b76a1c7f6d99ca.tar.xz |
Store any incoming presence push in the local cache anyway, even if there's no interested observers (yet *hint*) (SYN-115)
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r-- | synapse/handlers/presence.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 815d40f166..d40218dd28 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -659,10 +659,6 @@ class PresenceHandler(BaseHandler): if room_ids: logger.debug(" | %d interested room IDs %r", len(room_ids), room_ids) - if not observers and not room_ids: - logger.debug(" | no interested observers or room IDs") - continue - state = dict(push) del state["user_id"] @@ -683,6 +679,10 @@ class PresenceHandler(BaseHandler): self._user_cachemap_latest_serial += 1 statuscache.update(state, serial=self._user_cachemap_latest_serial) + if not observers and not room_ids: + logger.debug(" | no interested observers or room IDs") + continue + self.push_update_to_clients( observed_user=user, users_to_push=observers, |