Remove unnecessary sanity checks

Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
Cnly 2019-08-01 12:25:48 +08:00
parent 2fb994ad1d
commit e9f824b958

View file

@ -24,16 +24,6 @@ func ValidateRedaction(
return true, false, nil
}
// Don't allow an event to redact itself
if redaction.Redacts() == redaction.EventID() {
return true, false, nil
}
// Don't allow two events to redact each other
if redacted.Redacts() == redaction.EventID() {
return true, false, nil
}
var expectedDomain, redactorDomain gomatrixserverlib.ServerName
if _, expectedDomain, err = gomatrixserverlib.SplitID(
'@', redacted.Sender(),