From b238357c5315d32ef448a8bf2f7ec41b2b817f73 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 14 Jan 2022 16:14:42 +0530 Subject: [PATCH] Use emitUpdateForEntry --- src/matrix/room/timeline/Timeline.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/matrix/room/timeline/Timeline.js b/src/matrix/room/timeline/Timeline.js index 816ae3d1..e1d87ee9 100644 --- a/src/matrix/room/timeline/Timeline.js +++ b/src/matrix/room/timeline/Timeline.js @@ -278,9 +278,7 @@ export class Timeline { const relatedEntry = this._contextEntriesNotInTimeline.get(entry.relatedEventId); if (relatedEntry?.isNonPersisted && relatedEntry?.addLocalRelation(entry)) { // update other entries for which this entry is a context entry - relatedEntry.contextForEntries?.forEach(e => { - this._remoteEntries.findAndUpdate(te => te.id === e.id, () => "contextEntry"); - }); + relatedEntry.contextForEntries?.forEach(e => this._emitUpdateForEntry(e, "contextEntry")); } } }