summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-09-17 16:52:02 +0100
committerRichard van der Hoff <richard@matrix.org>2018-09-17 16:52:02 +0100
commitf75b9961c6c782d2ca4586782aa5cd2c0ae9a5b2 (patch)
treec263dddebf7610da1a5b041e4fa50ba002cde231
parentchangelog (diff)
downloadsynapse-f75b9961c6c782d2ca4586782aa5cd2c0ae9a5b2.tar.xz
Reinstate missing null check
-rw-r--r--synapse/handlers/directory.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py
index c745e6740b..18741c5fac 100644
--- a/synapse/handlers/directory.py
+++ b/synapse/handlers/directory.py
@@ -333,7 +333,7 @@ class DirectoryHandler(BaseHandler):
     def _user_can_delete_alias(self, alias, user_id):
         creator = yield self.store.get_room_alias_creator(alias.to_string())
 
-        if creator == user_id:
+        if creator is not None and creator == user_id:
             defer.returnValue(True)
 
         is_admin = yield self.auth.is_server_admin(UserID.from_string(user_id))