summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/api/events/validator.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/api/events/validator.py b/synapse/api/events/validator.py
index 59b486d6d7..2d4f2a3aa7 100644
--- a/synapse/api/events/validator.py
+++ b/synapse/api/events/validator.py
@@ -70,12 +70,18 @@ class EventValidator(object):
 
                 if type(content[key]) == dict:
                     # we must go deeper
-                    msg = self._check_json(content[key], template[key])
+                    msg = self._check_json_template(
+                        content[key],
+                        template[key]
+                    )
                     if msg:
                         return msg
                 elif type(content[key]) == list:
                     # make sure each item type in content matches the template
                     for entry in content[key]:
-                        msg = self._check_json(entry, template[key][0])
+                        msg = self._check_json_template(
+                            entry,
+                            template[key][0]
+                        )
                         if msg:
                             return msg
\ No newline at end of file