feat(security&privacy) : expose methods from sdk to update alias and rename alias to canonicalAlias
This commit is contained in:
parent
e56fe4fb38
commit
70f39c4f7c
6 changed files with 50 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue