From e484e5de969532b4673f766e2d8f1b4749d7b765 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Mon, 4 Apr 2022 15:47:44 +0100 Subject: [PATCH 1/2] Fix a spec compliance issue where requests to the `/publicRooms` federation API would specify `limit` as a string --- synapse/federation/transport/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py index de6e5f44fe85..d4b3cb3e98ca 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py @@ -481,7 +481,7 @@ async def get_public_rooms( if third_party_instance_id: data["third_party_instance_id"] = third_party_instance_id if limit: - data["limit"] = str(limit) + data["limit"] = limit if since_token: data["since"] = since_token @@ -509,7 +509,7 @@ async def get_public_rooms( if third_party_instance_id: args["third_party_instance_id"] = (third_party_instance_id,) if limit: - args["limit"] = [str(limit)] + args["limit"] = [limit] if since_token: args["since"] = [since_token] From e3caaceb0ff21d4015b75d887f9192cd8a17c8f4 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Mon, 4 Apr 2022 15:52:14 +0100 Subject: [PATCH 2/2] Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) --- changelog.d/12364.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/12364.bugfix diff --git a/changelog.d/12364.bugfix b/changelog.d/12364.bugfix new file mode 100644 index 000000000000..d042425d200e --- /dev/null +++ b/changelog.d/12364.bugfix @@ -0,0 +1 @@ +Fix a spec compliance issue where requests to the `/publicRooms` federation API would specify `limit` as a string. \ No newline at end of file