fix: PushNotification fromJson - toJson fails
This commit is contained in:
parent
3353518cad
commit
eb9bd0620f
|
|
@ -50,9 +50,11 @@ class PushNotification {
|
||||||
? (json['devices'] as List)
|
? (json['devices'] as List)
|
||||||
.map((d) => PushNotificationDevice.fromJson(d))
|
.map((d) => PushNotificationDevice.fromJson(d))
|
||||||
.toList()
|
.toList()
|
||||||
: (jsonDecode(json['devices'] as String) as List)
|
: json['devices'] is String
|
||||||
|
? (jsonDecode(json['devices'] as String) as List)
|
||||||
.map((d) => PushNotificationDevice.fromJson(d))
|
.map((d) => PushNotificationDevice.fromJson(d))
|
||||||
.toList(),
|
.toList()
|
||||||
|
: null,
|
||||||
eventId: json['event_id'] as String?,
|
eventId: json['event_id'] as String?,
|
||||||
prio: json['prio'] as String?,
|
prio: json['prio'] as String?,
|
||||||
roomAlias: json['room_alias'] as String?,
|
roomAlias: json['room_alias'] as String?,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue