mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-02 18:56:04 -04:00
Rename the EventFormatVersions
enum values so that they line up with room version numbers. (#13706)
This commit is contained in:
parent
bb5b47b62a
commit
c2fe48a6ff
13 changed files with 47 additions and 41 deletions
|
@ -109,7 +109,7 @@ def validate_event_for_room_version(event: "EventBase") -> None:
|
|||
if not is_invite_via_3pid:
|
||||
raise AuthError(403, "Event not signed by sender's server")
|
||||
|
||||
if event.format_version in (EventFormatVersions.V1,):
|
||||
if event.format_version in (EventFormatVersions.ROOM_V1_V2,):
|
||||
# Only older room versions have event IDs to check.
|
||||
event_id_domain = get_domain_from_id(event.event_id)
|
||||
|
||||
|
@ -716,7 +716,7 @@ def check_redaction(
|
|||
if user_level >= redact_level:
|
||||
return False
|
||||
|
||||
if room_version_obj.event_format == EventFormatVersions.V1:
|
||||
if room_version_obj.event_format == EventFormatVersions.ROOM_V1_V2:
|
||||
redacter_domain = get_domain_from_id(event.event_id)
|
||||
if not isinstance(event.redacts, str):
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue