Merge branch 'publicroomentry-fix-from-json' into 'master'

[PublicRoomEntry] Fix fromJson

See merge request famedly/famedlysdk!222
This commit is contained in:
Christian Pauly 2020-02-22 18:18:04 +00:00
commit 0b0facb0e0

View file

@ -55,7 +55,8 @@ class PublicRoomEntry {
}); });
PublicRoomEntry.fromJson(Map<String, dynamic> json, Client client) PublicRoomEntry.fromJson(Map<String, dynamic> json, Client client)
: aliases = json['aliases'].cast<String>(), : aliases =
json.containsKey('aliases') ? json['aliases'].cast<String>() : [],
avatarUrl = json['avatar_url'], avatarUrl = json['avatar_url'],
guestCanJoin = json['guest_can_join'], guestCanJoin = json['guest_can_join'],
name = json['name'], name = json['name'],