From d16c25b26d1e9ba7112a7b0800b8861510ffa54a Mon Sep 17 00:00:00 2001 From: Krille Fear Date: Wed, 10 Nov 2021 10:29:36 +0100 Subject: [PATCH] fix: Edits as lastEvent do not update This fixes a bug where edit events as lastEvents do not update from SENDING status. Because previously it only checks if the event ID matches. --- lib/src/room.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/room.dart b/lib/src/room.dart index 39aa4a3d..5d9ea32d 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -182,10 +182,12 @@ class Room { // We ignore events editing events older than the current-latest here so // i.e. newly sent edits for older events don't show up in room preview + final lastEvent = this.lastEvent; if (isMessageEvent && state.relationshipEventId != null && state.relationshipType == RelationshipTypes.edit && - state.relationshipEventId != lastEvent?.eventId) { + lastEvent != null && + !lastEvent.matchesEventOrTransactionId(state.relationshipEventId)) { return; }