Don't try and redact redactions for "Remove recent messages"
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
159547e6f8
commit
c0061e2f2a
|
@ -557,7 +557,7 @@ const RedactMessagesButton = ({member}) => {
|
||||||
let eventsToRedact = [];
|
let eventsToRedact = [];
|
||||||
while (timeline) {
|
while (timeline) {
|
||||||
eventsToRedact = timeline.getEvents().reduce((events, event) => {
|
eventsToRedact = timeline.getEvents().reduce((events, event) => {
|
||||||
if (event.getSender() === userId && !event.isRedacted()) {
|
if (event.getSender() === userId && !event.isRedacted() && !event.isRedaction()) {
|
||||||
return events.concat(event);
|
return events.concat(event);
|
||||||
} else {
|
} else {
|
||||||
return events;
|
return events;
|
||||||
|
|
|
@ -364,7 +364,7 @@ export default createReactClass({
|
||||||
let eventsToRedact = [];
|
let eventsToRedact = [];
|
||||||
for (const timeline of timelineSet.getTimelines()) {
|
for (const timeline of timelineSet.getTimelines()) {
|
||||||
eventsToRedact = timeline.getEvents().reduce((events, event) => {
|
eventsToRedact = timeline.getEvents().reduce((events, event) => {
|
||||||
if (event.getSender() === userId && !event.isRedacted()) {
|
if (event.getSender() === userId && !event.isRedacted() && !event.isRedaction()) {
|
||||||
return events.concat(event);
|
return events.concat(event);
|
||||||
} else {
|
} else {
|
||||||
return events;
|
return events;
|
||||||
|
|
Loading…
Reference in New Issue