Merge branch 'user-fix-null-statekey' into 'master'
[User] fix null statekey See merge request famedly/famedlysdk!115
This commit is contained in:
commit
1c07710bf8
|
@ -106,7 +106,9 @@ class User extends RoomState {
|
||||||
/// Returns the displayname or the local part of the Matrix ID if the user
|
/// Returns the displayname or the local part of the Matrix ID if the user
|
||||||
/// has no displayname.
|
/// has no displayname.
|
||||||
String calcDisplayname() => (displayName == null || displayName.isEmpty)
|
String calcDisplayname() => (displayName == null || displayName.isEmpty)
|
||||||
? stateKey.replaceFirst("@", "").split(":")[0]
|
? (stateKey != null
|
||||||
|
? stateKey.replaceFirst("@", "").split(":")[0]
|
||||||
|
: "Unknown User")
|
||||||
: displayName;
|
: displayName;
|
||||||
|
|
||||||
/// Call the Matrix API to kick this user from this room.
|
/// Call the Matrix API to kick this user from this room.
|
||||||
|
|
Loading…
Reference in a new issue