Merge branch 'soru/fix-canonical-alias' into 'master'
fix canonical alias sometimes being null See merge request famedly/famedlysdk!337
This commit is contained in:
commit
a2f7dd4223
|
@ -367,7 +367,8 @@ class Room {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The address in the format: #roomname:homeserver.org.
|
/// The address in the format: #roomname:homeserver.org.
|
||||||
String get canonicalAlias => states[EventTypes.RoomCanonicalAlias] != null
|
String get canonicalAlias => states[EventTypes.RoomCanonicalAlias] != null &&
|
||||||
|
states[EventTypes.RoomCanonicalAlias].content['alias'] is String
|
||||||
? states[EventTypes.RoomCanonicalAlias].content['alias']
|
? states[EventTypes.RoomCanonicalAlias].content['alias']
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue