diff options
author | Erik Johnston <erik@matrix.org> | 2019-01-29 10:37:40 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-01-29 10:37:40 +0000 |
commit | 40638ae7f50428454edd9961450f5dfb3cbd405a (patch) | |
tree | 34d159ee383affae2d2b8822b188498449be0ac5 /synapse/events/validator.py | |
parent | Fix up error messages (diff) | |
download | synapse-40638ae7f50428454edd9961450f5dfb3cbd405a.tar.xz |
Remove duplicate checks
Diffstat (limited to '')
-rw-r--r-- | synapse/events/validator.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/synapse/events/validator.py b/synapse/events/validator.py index 4fa03501f8..c53bf44e51 100644 --- a/synapse/events/validator.py +++ b/synapse/events/validator.py @@ -54,20 +54,6 @@ class EventValidator(object): if not isinstance(getattr(event, s), string_types): raise SynapseError(400, "'%s' not a string type" % (s,)) - if event.type == EventTypes.Message: - content_strings = [ - "body", - "msgtype", - ] - - self._ensure_strings(event.content, content_strings) - - elif event.type == EventTypes.Topic: - self._ensure_strings(event.content, ["topic"]) - - elif event.type == EventTypes.Name: - self._ensure_strings(event.content, ["name"]) - def validate_builder(self, event): """Validates that the builder/event has roughly the right format. Only checks values that we expect a proto event to have, rather than all the |