mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
feat(security&privacy) : expose methods from sdk to update alias and rename alias to canonicalAlias
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ class RoomDetailsPresenter @Inject constructor(
|
||||
return RoomDetailsState(
|
||||
roomId = room.roomId,
|
||||
roomName = roomName,
|
||||
roomAlias = room.alias,
|
||||
roomAlias = room.canonicalAlias,
|
||||
roomAvatarUrl = roomAvatar,
|
||||
roomTopic = topicState,
|
||||
memberCount = room.joinedMemberCount,
|
||||
|
||||
+3
-3
@@ -72,10 +72,10 @@ class EditRoomAddressPresenter @Inject constructor(
|
||||
|
||||
private fun MatrixRoom.firstAliasMatching(serverName: String): RoomAlias? {
|
||||
// Check if the canonical alias matches the homeserver
|
||||
if (this.alias?.matchesServer(serverName) == true) {
|
||||
return this.alias
|
||||
if (canonicalAlias?.matchesServer(serverName) == true) {
|
||||
return canonicalAlias
|
||||
}
|
||||
return this.alternativeAliases.firstOrNull { it.value.contains(serverName) }
|
||||
return alternativeAliases.firstOrNull { it.value.contains(serverName) }
|
||||
}
|
||||
|
||||
private fun RoomAlias.roomAddress(): String {
|
||||
|
||||
Reference in New Issue
Block a user