summary refs log tree commit diff
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-04-07 15:48:20 +0100
committerKegan Dougal <kegan@matrix.org>2015-04-07 15:48:20 +0100
commitae8ff92e05eb511b21206ec303056c36e00df61c (patch)
treea53582e3a8e3c2ca406de814036d4bbb0bd33326
parentupdate leo's contribs a bit (diff)
downloadsynapse-ae8ff92e05eb511b21206ec303056c36e00df61c.tar.xz
Fix a bug which causes a send event level of 0 to not be honoured.
Caused by a bad if check, which incorrectly executes for both 0 and None,
when None was the original intent.
-rw-r--r--synapse/api/auth.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 64f605b962..18f3d117b3 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -486,7 +486,7 @@ class Auth(object):
             send_level = send_level_event.content.get("events", {}).get(
                 event.type
             )
-            if not send_level:
+            if send_level is None:
                 if hasattr(event, "state_key"):
                     send_level = send_level_event.content.get(
                         "state_default", 50