From 80ec77a144d8e2194a85566fd4f9b7cd46bc6d68 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 2 Oct 2019 09:59:37 +0200 Subject: [PATCH] dont rely on timeline linkage to find events to redact --- src/components/views/rooms/MemberInfo.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index 2c667b83df..2ea6392e96 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -364,9 +364,9 @@ module.exports = createReactClass({ if (!room) { return; } - let timeline = room.getLiveTimeline(); + const timelineSet = room.getUnfilteredTimelineSet(); let eventsToRedact = []; - while (timeline) { + for (const timeline of timelineSet.getTimelines()) { eventsToRedact = timeline.getEvents().reduce((events, event) => { if (event.getSender() === userId && !event.isRedacted()) { return events.concat(event); @@ -374,7 +374,6 @@ module.exports = createReactClass({ return events; } }, eventsToRedact); - timeline = timeline.getNeighbouringTimeline(EventTimeline.BACKWARDS); } const count = eventsToRedact.length;