summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/api/room_versions.py7
-rw-r--r--synapse/events/builder.py8
2 files changed, 2 insertions, 13 deletions
diff --git a/synapse/api/room_versions.py b/synapse/api/room_versions.py
index cc30092ee5..c5e94cf213 100644
--- a/synapse/api/room_versions.py
+++ b/synapse/api/room_versions.py
@@ -32,13 +32,6 @@ class EventFormatVersion(Enum):
     ROOM_V4_PLUS = 3  # MSC1884-style $hash format: introduced for room v4
 
 
-KNOWN_EVENT_FORMAT_VERSIONS = {
-    EventFormatVersion.ROOM_V1_V2,
-    EventFormatVersion.ROOM_V3,
-    EventFormatVersion.ROOM_V4_PLUS,
-}
-
-
 class StateResolutionVersions:
     """Enum to identify the state resolution algorithms"""
 
diff --git a/synapse/events/builder.py b/synapse/events/builder.py
index 2c36164ca2..e933ea0a14 100644
--- a/synapse/events/builder.py
+++ b/synapse/events/builder.py
@@ -18,11 +18,7 @@ import attr
 from signedjson.types import SigningKey
 
 from synapse.api.constants import MAX_DEPTH
-from synapse.api.room_versions import (
-    KNOWN_EVENT_FORMAT_VERSIONS,
-    EventFormatVersion,
-    RoomVersion,
-)
+from synapse.api.room_versions import EventFormatVersion, RoomVersion
 from synapse.crypto.event_signing import add_hashes_and_signatures
 from synapse.event_auth import auth_types_for_event
 from synapse.events import EventBase, _EventInternalMetadata, make_event_from_dict
@@ -245,7 +241,7 @@ def create_local_event_from_event_dict(
     """
 
     format_version = room_version.event_format
-    if format_version not in KNOWN_EVENT_FORMAT_VERSIONS:
+    if format_version not in EventFormatVersion:
         raise Exception("No event format defined for version %r" % (format_version,))
 
     if internal_metadata_dict is None: