Merge pull request #5045 from matrix-org/t3chguy/fix/10818

Mass redact ignore room creation events
This commit is contained in:
Michael Telatynski 2020-08-03 13:52:21 +01:00 committed by GitHub
commit 25499fc687
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -550,7 +550,9 @@ const RedactMessagesButton = ({member}) => {
let eventsToRedact = [];
while (timeline) {
eventsToRedact = timeline.getEvents().reduce((events, event) => {
if (event.getSender() === userId && !event.isRedacted() && !event.isRedaction()) {
if (event.getSender() === userId && !event.isRedacted() && !event.isRedaction() &&
event.getType() !== "m.room.create"
) {
return events.concat(event);
} else {
return events;