From e9f824b958e3eca1c7e16a85d4218c1f57d9e44c Mon Sep 17 00:00:00 2001 From: Cnly Date: Thu, 1 Aug 2019 12:25:48 +0800 Subject: [PATCH] Remove unnecessary sanity checks Signed-off-by: Alex Chen --- common/redaction.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/common/redaction.go b/common/redaction.go index 6ddd54edc..6d7133a86 100644 --- a/common/redaction.go +++ b/common/redaction.go @@ -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(),