From 80ec77a144d8e2194a85566fd4f9b7cd46bc6d68 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 2 Oct 2019 09:59:37 +0200 Subject: [PATCH 1/2] 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 2c667b83df5..2ea6392e969 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; From 6bb303c381cae563551ab96807714b721079a69f Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 7 Oct 2019 17:11:21 +0200 Subject: [PATCH 2/2] add singular translation string --- src/i18n/strings/en_EN.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index fc094f48f62..fb52e07eabd 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -806,8 +806,10 @@ "Try scrolling up in the timeline to see if there are any earlier ones.": "Try scrolling up in the timeline to see if there are any earlier ones.", "Remove recent messages by %(user)s": "Remove recent messages by %(user)s", "You are about to remove %(count)s messages by %(user)s. This cannot be undone. Do you wish to continue?|other": "You are about to remove %(count)s messages by %(user)s. This cannot be undone. Do you wish to continue?", + "You are about to remove %(count)s messages by %(user)s. This cannot be undone. Do you wish to continue?|one": "You are about to remove 1 message by %(user)s. This cannot be undone. Do you wish to continue?", "For a large amount of messages, this might take some time. Please don't refresh your client in the meantime.": "For a large amount of messages, this might take some time. Please don't refresh your client in the meantime.", "Remove %(count)s messages|other": "Remove %(count)s messages", + "Remove %(count)s messages|one": "Remove 1 message", "Demote yourself?": "Demote yourself?", "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the room it will be impossible to regain privileges.": "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the room it will be impossible to regain privileges.", "Demote": "Demote",