mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
RoomPreviewData: Add room canonical alias property.
This commit is contained in:
@@ -54,14 +54,22 @@
|
||||
_roomName = publicRoom.displayname;
|
||||
_roomAvatarUrl = publicRoom.avatarUrl;
|
||||
_roomTopic = publicRoom.topic;
|
||||
_roomCanonicalAlias = publicRoom.canonicalAlias;
|
||||
_roomAliases = publicRoom.aliases;
|
||||
_numJoinedMembers = publicRoom.numJoinedMembers;
|
||||
|
||||
// First try to fallback to the name if displayname isn't present
|
||||
if (!_roomName.length) {
|
||||
if (!_roomName.length)
|
||||
{
|
||||
_roomName = publicRoom.name;
|
||||
}
|
||||
|
||||
if (!_roomName.length)
|
||||
{
|
||||
// Use the canonical alias if present.
|
||||
_roomName = publicRoom.canonicalAlias;
|
||||
}
|
||||
|
||||
if (!_roomName.length)
|
||||
{
|
||||
// Consider the room aliases to define a default room name.
|
||||
|
||||
Reference in New Issue
Block a user