diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-01 09:34:17 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-01 09:34:17 +0000 |
commit | b264b9548fd20a29b040dd0bf5117dbde735c7d1 (patch) | |
tree | 61683a0f4d8f12053f504ee770c85ba05c4e5fd1 /synapse | |
parent | Cache get_room_changes_for_user (diff) | |
parent | Don't use before_token. Its wrong. Use actual limit. (diff) | |
download | synapse-b264b9548fd20a29b040dd0bf5117dbde735c7d1.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/sync
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/notifier.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py index 32bd16661d..29965a9ab5 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -363,7 +363,7 @@ class Notifier(object): @defer.inlineCallbacks def check_for_updates(before_token, after_token): if not after_token.is_after(before_token): - defer.returnValue(EventStreamResult([], (before_token, before_token))) + defer.returnValue(EventStreamResult([], (from_token, from_token))) events = [] end_token = from_token @@ -376,14 +376,11 @@ class Notifier(object): continue if only_keys and name not in only_keys: continue - if limit: - new_limit = max(limit * 2, 10) - else: - new_limit = 10 + new_events, new_key = yield source.get_new_events( user=user, from_key=getattr(from_token, keyname), - limit=new_limit, + limit=limit, is_guest=is_peeking, room_ids=room_ids, ) |