diff options
author | Erik Johnston <erikj@jki.re> | 2019-01-29 10:55:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-29 10:55:07 +0000 |
commit | 073f6c2e5eefbaf64fcec9b8b98a029193d5e25d (patch) | |
tree | 7dbfb2e2bd21214c223468a0de3796c048e5da2b /synapse/handlers/message.py | |
parent | Fix receiving events from federation via a worker (diff) | |
parent | Remove duplicate checks (diff) | |
download | synapse-073f6c2e5eefbaf64fcec9b8b98a029193d5e25d.tar.xz |
Merge pull request #4494 from matrix-org/erikj/fixup_event_validator
Split up event validation between event and builder
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 67b364a6c3..05d1370c18 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -288,7 +288,7 @@ class EventCreationHandler(object): builder = self.event_builder_factory.new(room_version, event_dict) - self.validator.validate_new(builder) + self.validator.validate_builder(builder) if builder.type == EventTypes.Member: membership = builder.content.get("membership", None) @@ -326,6 +326,8 @@ class EventCreationHandler(object): prev_events_and_hashes=prev_events_and_hashes, ) + self.validator.validate_new(event) + defer.returnValue((event, context)) def _is_exempt_from_privacy_policy(self, builder, requester): |