summary refs log tree commit diff
path: root/synapse/replication/http/federation.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/replication/http/federation.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/replication/http/federation.py')
-rw-r--r--synapse/replication/http/federation.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/synapse/replication/http/federation.py b/synapse/replication/http/federation.py
index 2e16c69666..64a79da162 100644
--- a/synapse/replication/http/federation.py
+++ b/synapse/replication/http/federation.py
@@ -17,7 +17,7 @@ import logging
 
 from twisted.internet import defer
 
-from synapse.events import event_type_from_format_version
+from synapse.events import FrozenEvent
 from synapse.events.snapshot import EventContext
 from synapse.http.servlet import parse_json_object_from_request
 from synapse.replication.http._base import ReplicationEndpoint
@@ -70,7 +70,6 @@ class ReplicationFederationSendEventsRestServlet(ReplicationEndpoint):
 
             event_payloads.append({
                 "event": event.get_pdu_json(),
-                "event_format_version": event.format_version,
                 "internal_metadata": event.internal_metadata.get_dict(),
                 "rejected_reason": event.rejected_reason,
                 "context": serialized_context,
@@ -95,12 +94,9 @@ class ReplicationFederationSendEventsRestServlet(ReplicationEndpoint):
             event_and_contexts = []
             for event_payload in event_payloads:
                 event_dict = event_payload["event"]
-                format_ver = content["event_format_version"]
                 internal_metadata = event_payload["internal_metadata"]
                 rejected_reason = event_payload["rejected_reason"]
-
-                EventType = event_type_from_format_version(format_ver)
-                event = EventType(event_dict, internal_metadata, rejected_reason)
+                event = FrozenEvent(event_dict, internal_metadata, rejected_reason)
 
                 context = yield EventContext.deserialize(
                     self.store, event_payload["context"],