mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Deal with None limit
This commit is contained in:
parent
4a6eb5eb45
commit
13724569ec
@ -376,10 +376,14 @@ 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=max(limit * 2, 10),
|
limit=new_limit,
|
||||||
is_guest=is_peeking,
|
is_guest=is_peeking,
|
||||||
room_ids=room_ids,
|
room_ids=room_ids,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user