From ce73007157c71e1dbfaf367c6d874392d48cb598 Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Mon, 6 Jan 2020 00:51:41 +0100 Subject: [PATCH] call /join/{roomIdOrAlias} instead of /rooms/{roomId}/join The former endpoint doesn't work for joining over federation, the server_name parameter is ignored. Fixes #697 Signed-off-by: Marcus Hoffmann --- CHANGES.md | 1 + .../vector/matrix/android/internal/session/room/RoomAPI.kt | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4e39b72de7..02a05ce905 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,6 +16,7 @@ Bugfix 🐛: - Fix crash when opening room creation screen from the room filtering screen - Fix avatar image disappearing (#777) - Fix read marker banner when permalink + - Fix joining upgraded rooms (#697) Translations 🗣: - diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/RoomAPI.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/RoomAPI.kt index c5b3f03d35..6896788de9 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/RoomAPI.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/RoomAPI.kt @@ -212,11 +212,12 @@ internal interface RoomAPI { /** * Join the given room. * - * @param roomId the room id + * @param roomIdOrAlias the room id or alias + * @param server_name the servers to attempt to join the room through * @param params the request body */ - @POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/join") - fun join(@Path("roomId") roomId: String, + @POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "join/{roomIdOrAlias}") + fun join(@Path("roomIdOrAlias") roomIdOrAlias: String, @Query("server_name") viaServers: List, @Body params: Map): Call