mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-05 12:44:27 -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
|
@ -50,7 +50,9 @@ class EventStreamRestServlet(RestServlet):
|
|||
raise SynapseError(400, "Guest users must specify room_id param")
|
||||
room_id = parse_string(request, "room_id")
|
||||
|
||||
pagin_config = await PaginationConfig.from_request(self.store, request)
|
||||
pagin_config = await PaginationConfig.from_request(
|
||||
self.store, request, default_limit=10
|
||||
)
|
||||
timeout = EventStreamRestServlet.DEFAULT_LONGPOLL_TIME_MS
|
||||
if b"timeout" in args:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue