Fix a spec compliance issue where requests to the `/publicRooms` federation API would specify `limit` as a string. (#12364)

pull/12379/head
reivilibre 2022-04-05 12:45:36 +01:00 committed by GitHub
parent 708d88b1a2
commit 42d8710f38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/12364.bugfix Normal file
View File

@ -0,0 +1 @@
Fix a spec compliance issue where requests to the `/publicRooms` federation API would specify `limit` as a string.

View File

@ -481,7 +481,7 @@ class TransportLayerClient:
if third_party_instance_id: if third_party_instance_id:
data["third_party_instance_id"] = third_party_instance_id data["third_party_instance_id"] = third_party_instance_id
if limit: if limit:
data["limit"] = str(limit) data["limit"] = limit
if since_token: if since_token:
data["since"] = since_token data["since"] = since_token
@ -509,7 +509,7 @@ class TransportLayerClient:
if third_party_instance_id: if third_party_instance_id:
args["third_party_instance_id"] = (third_party_instance_id,) args["third_party_instance_id"] = (third_party_instance_id,)
if limit: if limit:
args["limit"] = [str(limit)] args["limit"] = [limit]
if since_token: if since_token:
args["since"] = [since_token] args["since"] = [since_token]