mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-25 19:15:51 +03:00
@log_function on PresenceStream's get_new_events_for_user()
This commit is contained in:
parent
52f1d3c886
commit
f5d2514fc0
1 changed files with 3 additions and 1 deletions
|
@ -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)):
|
||||
|
|
Loading…
Reference in a new issue