summary refs log tree commit diff
path: root/synapse/events/validator.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-11-02 09:55:52 -0400
committerGitHub <noreply@github.com>2021-11-02 09:55:52 -0400
commitc01bc5f43d1c7d0a25f397b542ced57894395519 (patch)
tree77f8fa240987be9d35564985f8defe33c5f49188 /synapse/events/validator.py
parentDelete messages for hidden devices from `device_inbox` (#11199) (diff)
downloadsynapse-c01bc5f43d1c7d0a25f397b542ced57894395519.tar.xz
Add remaining type hints to `synapse.events`. (#11098)
Diffstat (limited to 'synapse/events/validator.py')
-rw-r--r--synapse/events/validator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/events/validator.py b/synapse/events/validator.py
index 4d459c17f1..cf86934968 100644
--- a/synapse/events/validator.py
+++ b/synapse/events/validator.py
@@ -55,7 +55,7 @@ class EventValidator:
         ]
 
         for k in required:
-            if not hasattr(event, k):
+            if k not in event:
                 raise SynapseError(400, "Event does not have key %s" % (k,))
 
         # Check that the following keys have string values