From fb326d877aac1da6b1ba05bd891b0ed275d574b0 Mon Sep 17 00:00:00 2001 From: Doug Date: Mon, 1 Aug 2022 16:21:59 +0100 Subject: [PATCH] Send an empty dictionary when calling /join to be spec compliant. --- MatrixSDK/MXRestClient.m | 5 +++++ changelog.d/6481.bugfix | 1 + 2 files changed, 6 insertions(+) create mode 100644 changelog.d/6481.bugfix diff --git a/MatrixSDK/MXRestClient.m b/MatrixSDK/MXRestClient.m index 5d0c8fa39f..8060837d0f 100644 --- a/MatrixSDK/MXRestClient.m +++ b/MatrixSDK/MXRestClient.m @@ -2470,6 +2470,11 @@ - (MXHTTPOperation*)joinRoom:(NSString*)roomIdOrAlias @"third_party_signed":thirdPartySigned }; } + else + { + // A body is required even if empty + parameters = @{}; + } // Characters in a room alias need to be escaped in the URL NSString *path = [NSString stringWithFormat:@"%@/join/%@", diff --git a/changelog.d/6481.bugfix b/changelog.d/6481.bugfix new file mode 100644 index 0000000000..8b2e49a307 --- /dev/null +++ b/changelog.d/6481.bugfix @@ -0,0 +1 @@ +MXRestClient: Send an empty dictionary when calling /join to be spec compliant. \ No newline at end of file