Merge pull request #4573 from matrix-org/t3chguy/remove_recent_self
Don't try and redact redactions for "Remove recent messages"
This commit is contained in:
commit
b95d533c4a
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue