From 40638ae7f50428454edd9961450f5dfb3cbd405a Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 29 Jan 2019 10:37:40 +0000 Subject: [PATCH] Remove duplicate checks --- synapse/events/validator.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/synapse/events/validator.py b/synapse/events/validator.py index 4fa03501f..c53bf44e5 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