diff options
author | reivilibre <oliverw@matrix.org> | 2022-09-07 10:08:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 11:08:20 +0100 |
commit | c2fe48a6ffb99f553f3eaecb8f15bcbedb58add0 (patch) | |
tree | e9c6f09d739b503c9a15161e3502944b0c022c84 /synapse/federation | |
parent | Add Admin API to Fetch Messages Within a Particular Window (#13672) (diff) | |
download | synapse-c2fe48a6ffb99f553f3eaecb8f15bcbedb58add0.tar.xz |
Rename the `EventFormatVersions` enum values so that they line up with room version numbers. (#13706)
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/federation_base.py | 2 | ||||
-rw-r--r-- | synapse/federation/federation_client.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/federation/federation_base.py b/synapse/federation/federation_base.py index 4269a98db2..abe2c1971a 100644 --- a/synapse/federation/federation_base.py +++ b/synapse/federation/federation_base.py @@ -194,7 +194,7 @@ async def _check_sigs_on_pdu( # event id's domain (normally only the case for joins/leaves), and add additional # checks. Only do this if the room version has a concept of event ID domain # (ie, the room version uses old-style non-hash event IDs). - if room_version.event_format == EventFormatVersions.V1: + if room_version.event_format == EventFormatVersions.ROOM_V1_V2: event_domain = get_domain_from_id(pdu.event_id) if event_domain != sender_domain: try: diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index 7ee2974bb1..4a4289ee7c 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -1190,7 +1190,7 @@ class FederationClient(FederationBase): # Otherwise, consider it a legitimate error and raise. err = e.to_synapse_error() if self._is_unknown_endpoint(e, err): - if room_version.event_format != EventFormatVersions.V1: + if room_version.event_format != EventFormatVersions.ROOM_V1_V2: raise SynapseError( 400, "User's homeserver does not support this room version", |