From 4af676376536a8d6237381d87ec83ef2fa398b4a Mon Sep 17 00:00:00 2001 From: Jayesh Nirve Date: Fri, 27 Aug 2021 21:11:06 +0530 Subject: [PATCH] fix: missing null check in hideEdit condition --- lib/src/event.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/event.dart b/lib/src/event.dart index 0d3c478b..44396bc7 100644 --- a/lib/src/event.dart +++ b/lib/src/event.dart @@ -589,7 +589,9 @@ class Event extends MatrixEvent { RegExp(r'^>( \*)? <[^>]+>[^\n\r]+\r?\n(> [^\n]*\r?\n)*\r?\n'), ''); } // Hide edit fallback - if (hideEdit && relationshipType == RelationshipTypes.edit) { + if (hideEdit && + relationshipType == RelationshipTypes.edit && + content.containsKey('m.new_content')) { localizedBody = content['m.new_content']['body'] ?? localizedBody; }