mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 05:43:09 -06:00
Ignore events that redact themselves
This commit is contained in:
parent
007afcae60
commit
7428a444b7
|
|
@ -540,6 +540,11 @@ func (d *Database) handleRedactions(
|
|||
var err error
|
||||
isRedactionEvent := event.Type() == gomatrixserverlib.MRoomRedaction && event.StateKey() == nil
|
||||
if isRedactionEvent {
|
||||
// an event which redacts itself should be ignored
|
||||
if event.EventID() == event.Redacts() {
|
||||
return nil, "", nil
|
||||
}
|
||||
|
||||
err = d.RedactionsTable.InsertRedaction(ctx, txn, tables.RedactionInfo{
|
||||
Validated: false,
|
||||
RedactionEventID: event.EventID(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue