mirror of
https://github.com/element-hq/synapse.git
synced 2026-05-24 23:55:21 +00:00
Update synapse/handlers/admin.py
Co-authored-by: Eric Eastwood <erice@element.io>
This commit is contained in:
@@ -491,12 +491,7 @@ class AdminHandler:
|
||||
prev_state_events = event.get_dict().get(
|
||||
"prev_state_events", None
|
||||
)
|
||||
if prev_state_events is None:
|
||||
# should be impossible as prev_state_events is a required field.
|
||||
raise Exception(
|
||||
"cannot set prev_state_events for redaction event as parent has "
|
||||
+ "no prev_state_events",
|
||||
)
|
||||
assert prev_state_events is not None, "Parent event of redaction has no `prev_state_events` which should be impossible as `prev_state_events` is a required event in MSC4242 rooms"
|
||||
# set the prev event to the offending message to allow for redactions
|
||||
# to be processed in the case where the user has been kicked/banned before
|
||||
# redactions are requested.
|
||||
|
||||
Reference in New Issue
Block a user