🐛 Fix null value in event body

This commit is contained in:
LittleSheep 2024-06-28 19:33:59 +08:00
parent 29a975235c
commit 424be16ab0

View File

@ -79,8 +79,8 @@ class EventMessageBody {
factory EventMessageBody.fromJson(Map<String, dynamic> json) =>
EventMessageBody(
text: json['text'],
algorithm: json['algorithm'],
text: json['text'] ?? '',
algorithm: json['algorithm'] ?? 'plain',
attachments: json['attachments'] != null
? List<int>.from(json['attachments'].map((x) => x))
: null,