Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Store any incoming presence push in the local cache anyway, even if t…
Browse files Browse the repository at this point in the history
…here's no interested observers (yet *hint*) (SYN-115)
  • Loading branch information
Paul "LeoNerd" Evans committed Dec 3, 2014
1 parent 370cd90 commit 52f1d3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions synapse/handlers/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,6 @@ def incoming_presence(self, origin, content):
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"]

Expand All @@ -683,6 +679,10 @@ def incoming_presence(self, origin, content):
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,
Expand Down

0 comments on commit 52f1d3c

Please sign in to comment.