diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-12-03 19:48:14 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-12-03 19:48:14 +0000 |
commit | f5d2514fc05e062b1425139c5064cd5bae3c3ca7 (patch) | |
tree | b4a880d3f3bd596c54535c9c0528ea71969ee5d6 /synapse/handlers/presence.py | |
parent | Store any incoming presence push in the local cache anyway, even if there's n... (diff) | |
download | synapse-f5d2514fc05e062b1425139c5064cd5bae3c3ca7.tar.xz |
@log_function on PresenceStream's get_new_events_for_user()
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/presence.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index d40218dd28..84a039489f 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -804,6 +804,7 @@ class PresenceEventSource(object): ) @defer.inlineCallbacks + @log_function def get_new_events_for_user(self, user, from_key, limit): from_key = int(from_key) @@ -816,7 +817,8 @@ class PresenceEventSource(object): # TODO(paul): use a DeferredList ? How to limit concurrency. for observed_user in cachemap.keys(): cached = cachemap[observed_user] - if not (from_key < cached.serial): + + if cached.serial <= from_key: continue if (yield self.is_visible(observer_user, observed_user)): |