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.
This commit is contained in:
Krille Fear 2021-11-10 10:29:36 +01:00
parent db7d3b652a
commit d16c25b26d
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}