🐛 Fix null value in event body
This commit is contained in:
parent
29a975235c
commit
424be16ab0
@ -79,8 +79,8 @@ class EventMessageBody {
|
|||||||
|
|
||||||
factory EventMessageBody.fromJson(Map<String, dynamic> json) =>
|
factory EventMessageBody.fromJson(Map<String, dynamic> json) =>
|
||||||
EventMessageBody(
|
EventMessageBody(
|
||||||
text: json['text'],
|
text: json['text'] ?? '',
|
||||||
algorithm: json['algorithm'],
|
algorithm: json['algorithm'] ?? 'plain',
|
||||||
attachments: json['attachments'] != null
|
attachments: json['attachments'] != null
|
||||||
? List<int>.from(json['attachments'].map((x) => x))
|
? List<int>.from(json['attachments'].map((x) => x))
|
||||||
: null,
|
: null,
|
||||||
|
Loading…
Reference in New Issue
Block a user