From 7ad73bb453afbe20f04ffdded0ccad5f35e3cc3d Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 7 Jan 2022 19:56:31 +0530 Subject: [PATCH] Move check down --- src/matrix/room/timeline/Timeline.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/timeline/Timeline.js b/src/matrix/room/timeline/Timeline.js index d24a30ff..55b3e4f5 100644 --- a/src/matrix/room/timeline/Timeline.js +++ b/src/matrix/room/timeline/Timeline.js @@ -267,7 +267,7 @@ export class Timeline { _updateEntriesFetchedFromHomeserver(entries) { for (const entry of entries) { const relatedEntry = this._contextEntriesNotInTimeline.get(entry.relatedEventId); - if (!relatedEntry || !relatedEntry.isNonPersisted) { + if (!relatedEntry) { /** * Updates for entries in timeline is handled by remoteEntries observable collection * Updates for entries not in timeline but fetched from storage is handled in this.replaceEntries() @@ -294,7 +294,7 @@ export class Timeline { * @returns a new entry or undefined */ _createEntryFromRelatedEntries(entry, relatedEntry) { - if (entry.isRedaction) { + if (entry.isRedaction && relatedEntry.isNonPersisted) { const newEntry = relatedEntry.clone(); newEntry.redact(entry); return newEntry;