summary refs log tree commit diff
path: root/synapse/storage/events_worker.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2019-01-25 10:23:51 +0000
committerGitHub <noreply@github.com>2019-01-25 10:23:51 +0000
commitbe6a7e47fa75d72466a356c254376b8eb0707bb2 (patch)
tree08902e6b1564b865a5b21194c844d85a693ef095 /synapse/storage/events_worker.py
parentMerge pull request #4451 from matrix-org/erikj/require_format_version (diff)
downloadsynapse-be6a7e47fa75d72466a356c254376b8eb0707bb2.tar.xz
Revert "Require event format version to parse or create events"
Diffstat (limited to 'synapse/storage/events_worker.py')
-rw-r--r--synapse/storage/events_worker.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/storage/events_worker.py b/synapse/storage/events_worker.py
index 0a0ca58fc4..599f892858 100644
--- a/synapse/storage/events_worker.py
+++ b/synapse/storage/events_worker.py
@@ -23,7 +23,7 @@ from twisted.internet import defer
 
 from synapse.api.constants import EventFormatVersions
 from synapse.api.errors import NotFoundError
-from synapse.events import FrozenEvent, event_type_from_format_version  # noqa: F401
+from synapse.events import FrozenEvent
 # these are only included to make the type annotations work
 from synapse.events.snapshot import EventContext  # noqa: F401
 from synapse.events.utils import prune_event
@@ -412,7 +412,11 @@ class EventsWorkerStore(SQLBaseStore):
                 # of a event format version, so it must be a V1 event.
                 format_version = EventFormatVersions.V1
 
-            original_ev = event_type_from_format_version(format_version)(
+            # TODO: When we implement new event formats we'll need to use a
+            # different event python type
+            assert format_version == EventFormatVersions.V1
+
+            original_ev = FrozenEvent(
                 event_dict=d,
                 internal_metadata_dict=internal_metadata,
                 rejected_reason=rejected_reason,