diff options
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/notifier.py | 9 | ||||
-rw-r--r-- | synapse/storage/stream.py | 5 |
2 files changed, 3 insertions, 11 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, ) diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index cc9e623608..8dc8f5c640 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -323,11 +323,6 @@ class StreamStore(SQLBaseStore): " WHERE m.user_id = ? AND m.membership = 'join'" ) current_room_membership_args = [user_id] - if room_ids: - current_room_membership_sql += " AND m.room_id in (%s)" % ( - ",".join(map(lambda _: "?", room_ids)) - ) - current_room_membership_args = [user_id] + room_ids # We also want to get any membership events about that user, e.g. # invites or leave notifications. |