mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-10 11:10:00 -04:00
Fix a long-standing bug where the user directory would return 1 more row than requested. (#14631)
This commit is contained in:
parent
9e82caac45
commit
cf1059d045
4 changed files with 10 additions and 3 deletions
|
@ -63,8 +63,8 @@ class UserDirectorySearchRestServlet(RestServlet):
|
|||
|
||||
body = parse_json_object_from_request(request)
|
||||
|
||||
limit = body.get("limit", 10)
|
||||
limit = min(limit, 50)
|
||||
limit = int(body.get("limit", 10))
|
||||
limit = max(min(limit, 50), 0)
|
||||
|
||||
try:
|
||||
search_term = body["search_term"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue