mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Merge pull request #6288 from deepbluev7/nico/stable-aliases
Use stable endpoint for alias management
This commit is contained in:
commit
c77ecc6a21
4 changed files with 3 additions and 3 deletions
1
changelog.d/6288.bugfix
Normal file
1
changelog.d/6288.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Use stable endpoint for alias management instead of MSC2432. Contributed by Nico.
|
|
@ -162,7 +162,7 @@ enum class ApiPath(val path: String, val method: String) {
|
|||
KICK_USER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/kick", "POST"),
|
||||
REDACT_EVENT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/redact/{eventId}/{txnId}", "PUT"),
|
||||
REPORT_CONTENT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/report/{eventId}", "POST"),
|
||||
GET_ALIASES(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "org.matrix.msc2432/rooms/{roomId}/aliases", "GET"),
|
||||
GET_ALIASES(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/aliases", "GET"),
|
||||
SEND_TYPING_STATE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/typing/{userId}", "PUT"),
|
||||
PUT_TAG(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/rooms/{roomId}/tags/{tag}", "PUT"),
|
||||
DELETE_TAG(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/rooms/{roomId}/tags/{tag}", "DELETE"),
|
||||
|
|
|
@ -377,7 +377,7 @@ internal interface RoomAPI {
|
|||
* Get a list of aliases maintained by the local server for the given room.
|
||||
* Ref: https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-rooms-roomid-aliases
|
||||
*/
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "org.matrix.msc2432/rooms/{roomId}/aliases")
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/aliases")
|
||||
suspend fun getAliases(@Path("roomId") roomId: String): GetAliasesResponse
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,6 @@ internal class DefaultGetRoomLocalAliasesTask @Inject constructor(
|
|||
) : GetRoomLocalAliasesTask {
|
||||
|
||||
override suspend fun execute(params: GetRoomLocalAliasesTask.Params): List<String> {
|
||||
// We do not check for "org.matrix.msc2432", so the API may be missing
|
||||
val response = executeRequest(globalErrorReceiver) {
|
||||
roomAPI.getAliases(roomId = params.roomId)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue