From 424be16ab0c2e1efeb4f1579cf0eba3219839141 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 28 Jun 2024 19:33:59 +0800 Subject: [PATCH] :bug: Fix null value in event body --- lib/models/event.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/models/event.dart b/lib/models/event.dart index f4cd331..7121eca 100644 --- a/lib/models/event.dart +++ b/lib/models/event.dart @@ -79,8 +79,8 @@ class EventMessageBody { factory EventMessageBody.fromJson(Map json) => EventMessageBody( - text: json['text'], - algorithm: json['algorithm'], + text: json['text'] ?? '', + algorithm: json['algorithm'] ?? 'plain', attachments: json['attachments'] != null ? List.from(json['attachments'].map((x) => x)) : null,