mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 12:15:02 -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
|
@ -39,7 +39,9 @@ class InitialSyncRestServlet(RestServlet):
|
|||
requester = await self.auth.get_user_by_req(request)
|
||||
args: Dict[bytes, List[bytes]] = request.args # type: ignore
|
||||
as_client_event = b"raw" not in args
|
||||
pagination_config = await PaginationConfig.from_request(self.store, request)
|
||||
pagination_config = await PaginationConfig.from_request(
|
||||
self.store, request, default_limit=10
|
||||
)
|
||||
include_archived = parse_boolean(request, "archived", default=False)
|
||||
content = await self.initial_sync_handler.snapshot_all_rooms(
|
||||
user_id=requester.user.to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue