From dc2d03dea5ad94cc3bb76eb58ece95ac12d41704 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:59:51 +0530 Subject: [PATCH] fix public rooms post request search params and body (#4110) --- src/client.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index f2da061d8..5e1459338 100644 --- a/src/client.ts +++ b/src/client.ts @@ -8457,11 +8457,17 @@ export class MatrixClient extends TypedEventEmitter { - const queryParams: QueryDict = { server, limit, since }; if (Object.keys(options).length === 0) { + const queryParams: QueryDict = { server, limit, since }; return this.http.authedRequest(Method.Get, "/publicRooms", queryParams); } else { - return this.http.authedRequest(Method.Post, "/publicRooms", queryParams, options); + const queryParams: QueryDict = { server }; + const body = { + limit, + since, + ...options, + }; + return this.http.authedRequest(Method.Post, "/publicRooms", queryParams, body); } }