mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-07 06:03:09 -06:00
Use pl.UserLevel
This commit is contained in:
parent
82af906b71
commit
26dd627a2a
|
|
@ -833,7 +833,7 @@ func (d *Database) handleRedactions(
|
||||||
return nil, "", fmt.Errorf("unable to get powerlevels for room: %w", err)
|
return nil, "", fmt.Errorf("unable to get powerlevels for room: %w", err)
|
||||||
}
|
}
|
||||||
redactPL := pl.Redact
|
redactPL := pl.Redact
|
||||||
redactUser := pl.Users[redactionEvent.Sender()]
|
redactUser := pl.UserLevel(redactionEvent.Sender())
|
||||||
// The power level of the redaction event’s sender is greater than or equal to the redact level.
|
// The power level of the redaction event’s sender is greater than or equal to the redact level.
|
||||||
userAllowed := redactUser >= redactPL
|
userAllowed := redactUser >= redactPL
|
||||||
// The domain of the redaction event’s sender matches that of the original event’s sender.
|
// The domain of the redaction event’s sender matches that of the original event’s sender.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue