Set MSC4293 flag when autoredacting users#612
Conversation
| // Use MSC4293 and still fall back later | ||
| // See https://github.com/matrix-org/matrix-spec-proposals/pull/4293 | ||
| await this.client.sendStateEvent(roomId, "m.room.member", member.userId, { | ||
| "membership": "ban", | ||
| "org.matrix.msc4293.redact_events": true, | ||
| }); | ||
|
|
||
| // Fallback | ||
| this.redactUser(member.userId, roomId); |
There was a problem hiding this comment.
There is a risk here if Mjolnir fails to redact events in the fallback. This can happen if there are more events in the timeline than the pagination limit, or if a call to /redact fails. Trying to workaround by using !mjolnir redact will no longer work in this room because Mjolnir will no longer receive unredacted events from /messages due to the behavior of MSC4293.
There was a problem hiding this comment.
Receiving redacted events might be fine though? The logic could probably inspect the reason if it wanted too.
There was a problem hiding this comment.
That's true, It could be fine, but only because mjolnir doesn't exclude the redacted events from being called with /redact again
Lines 102 to 121 in 41a0ca2
| // See https://github.com/matrix-org/matrix-spec-proposals/pull/4293 | ||
| await this.client.sendStateEvent(roomId, "m.room.member", member.userId, { | ||
| "membership": "ban", | ||
| "org.matrix.msc4293.redact_events": true, |
There was a problem hiding this comment.
Was reason intentionally omitted here?
MSC: matrix-org/matrix-spec-proposals#4293