mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-01-05 16:40:52 -05:00
Ensure that event.redacts is the proper type before handling it (#8457)
This fixes a bug when backfilling invalid events.
This commit is contained in:
parent
0991a2da93
commit
da11cc22be
1
changelog.d/8457.bugfix
Normal file
1
changelog.d/8457.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix a bug where backfilling a room with an event that was missing the `redacts` field would break.
|
@ -446,6 +446,8 @@ def check_redaction(
|
||||
|
||||
if room_version_obj.event_format == EventFormatVersions.V1:
|
||||
redacter_domain = get_domain_from_id(event.event_id)
|
||||
if not isinstance(event.redacts, str):
|
||||
return False
|
||||
redactee_domain = get_domain_from_id(event.redacts)
|
||||
if redacter_domain == redactee_domain:
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user