mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:45:01 -04:00
Do not allow a None-limit on PaginationConfig. (#14146)
The callers either set a default limit or manually handle a None-limit later on (by setting a default value). Update the callers to always instantiate PaginationConfig with a default limit and then assume the limit is non-None.
This commit is contained in:
parent
c7446906bd
commit
126a15794c
16 changed files with 29 additions and 50 deletions
|
@ -1596,7 +1596,9 @@ class PresenceEventSource(EventSource[int, UserPresenceState]):
|
|||
self,
|
||||
user: UserID,
|
||||
from_key: Optional[int],
|
||||
limit: Optional[int] = None,
|
||||
# Having a default limit doesn't match the EventSource API, but some
|
||||
# callers do not provide it. It is unused in this class.
|
||||
limit: int = 0,
|
||||
room_ids: Optional[Collection[str]] = None,
|
||||
is_guest: bool = False,
|
||||
explicit_room_id: Optional[str] = None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue