diff options
author | Erik Johnston <erikj@jki.re> | 2019-01-25 10:26:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-25 10:26:13 +0000 |
commit | 829a7b20325aa35ecca11624baf68ebdb247e123 (patch) | |
tree | 08902e6b1564b865a5b21194c844d85a693ef095 /synapse/replication/http/send_event.py | |
parent | Merge pull request #4451 from matrix-org/erikj/require_format_version (diff) | |
parent | Revert "Require event format version to parse or create events" (diff) | |
download | synapse-829a7b20325aa35ecca11624baf68ebdb247e123.tar.xz |
Merge pull request #4469 from matrix-org/revert-4451-erikj/require_format_version
Revert "Require event format version to parse or create events"
Diffstat (limited to 'synapse/replication/http/send_event.py')
-rw-r--r-- | synapse/replication/http/send_event.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/synapse/replication/http/send_event.py b/synapse/replication/http/send_event.py index 3635015eda..5b52c91650 100644 --- a/synapse/replication/http/send_event.py +++ b/synapse/replication/http/send_event.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 @@ -74,7 +74,6 @@ class ReplicationSendEventRestServlet(ReplicationEndpoint): payload = { "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, @@ -91,12 +90,9 @@ class ReplicationSendEventRestServlet(ReplicationEndpoint): content = parse_json_object_from_request(request) event_dict = content["event"] - format_ver = content["event_format_version"] internal_metadata = content["internal_metadata"] rejected_reason = content["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) requester = Requester.deserialize(self.store, content["requester"]) context = yield EventContext.deserialize(self.store, content["context"]) |