mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-04 05:38:57 +01:00
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/sync
This commit is contained in:
commit
b264b9548f
1 changed files with 3 additions and 6 deletions
|
@ -363,7 +363,7 @@ class Notifier(object):
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def check_for_updates(before_token, after_token):
|
def check_for_updates(before_token, after_token):
|
||||||
if not after_token.is_after(before_token):
|
if not after_token.is_after(before_token):
|
||||||
defer.returnValue(EventStreamResult([], (before_token, before_token)))
|
defer.returnValue(EventStreamResult([], (from_token, from_token)))
|
||||||
|
|
||||||
events = []
|
events = []
|
||||||
end_token = from_token
|
end_token = from_token
|
||||||
|
@ -376,14 +376,11 @@ class Notifier(object):
|
||||||
continue
|
continue
|
||||||
if only_keys and name not in only_keys:
|
if only_keys and name not in only_keys:
|
||||||
continue
|
continue
|
||||||
if limit:
|
|
||||||
new_limit = max(limit * 2, 10)
|
|
||||||
else:
|
|
||||||
new_limit = 10
|
|
||||||
new_events, new_key = yield source.get_new_events(
|
new_events, new_key = yield source.get_new_events(
|
||||||
user=user,
|
user=user,
|
||||||
from_key=getattr(from_token, keyname),
|
from_key=getattr(from_token, keyname),
|
||||||
limit=new_limit,
|
limit=limit,
|
||||||
is_guest=is_peeking,
|
is_guest=is_peeking,
|
||||||
room_ids=room_ids,
|
room_ids=room_ids,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue