summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2019-01-25 10:26:13 +0000
committerGitHub <noreply@github.com>2019-01-25 10:26:13 +0000
commit829a7b20325aa35ecca11624baf68ebdb247e123 (patch)
tree08902e6b1564b865a5b21194c844d85a693ef095 /synapse/handlers/message.py
parentMerge pull request #4451 from matrix-org/erikj/require_format_version (diff)
parentRevert "Require event format version to parse or create events" (diff)
downloadsynapse-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/handlers/message.py')
-rw-r--r--synapse/handlers/message.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 7aaa4fba33..a7cd779b02 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -278,15 +278,7 @@ class EventCreationHandler(object):
         """
         yield self.auth.check_auth_blocking(requester.user.to_string())
 
-        if event_dict["type"] == EventTypes.Create and event_dict["state_key"] == "":
-            room_version = event_dict["content"]["room_version"]
-        else:
-            try:
-                room_version = yield self.store.get_room_version(event_dict["room_id"])
-            except NotFoundError:
-                raise AuthError(403, "Unknown room")
-
-        builder = self.event_builder_factory.new(room_version, event_dict)
+        builder = self.event_builder_factory.new(event_dict)
 
         self.validator.validate_new(builder)