summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-02-07 09:26:57 +0000
committerGitHub <noreply@github.com>2020-02-07 09:26:57 +0000
commitf4884444c36d92659b9d7a2a90d42324ab786873 (patch)
treecf4e473c479e0f9fdfea177bd4f093e09cfeac4a /synapse
parentMerge pull request #6856 from matrix-org/rav/redact_changes/6 (diff)
downloadsynapse-f4884444c36d92659b9d7a2a90d42324ab786873.tar.xz
remove unused room_version_to_event_format (#6857)
Diffstat (limited to 'synapse')
-rw-r--r--synapse/events/__init__.py24
1 files changed, 1 insertions, 23 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 92f76703b3..89d41d82b6 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -21,8 +21,7 @@ import six
 
 from unpaddedbase64 import encode_base64
 
-from synapse.api.errors import UnsupportedRoomVersionError
-from synapse.api.room_versions import KNOWN_ROOM_VERSIONS, EventFormatVersions
+from synapse.api.room_versions import EventFormatVersions
 from synapse.types import JsonDict
 from synapse.util.caches import intern_dict
 from synapse.util.frozenutils import freeze
@@ -408,27 +407,6 @@ class FrozenEventV3(FrozenEventV2):
         return self._event_id
 
 
-def room_version_to_event_format(room_version):
-    """Converts a room version string to the event format
-
-    Args:
-        room_version (str)
-
-    Returns:
-        int
-
-    Raises:
-        UnsupportedRoomVersionError if the room version is unknown
-    """
-    v = KNOWN_ROOM_VERSIONS.get(room_version)
-
-    if not v:
-        # this can happen if support is withdrawn for a room version
-        raise UnsupportedRoomVersionError()
-
-    return v.event_format
-
-
 def event_type_from_format_version(format_version):
     """Returns the python type to use to construct an Event object for the
     given event format version.