diff options
author | Erik Johnston <erik@matrix.org> | 2016-03-17 15:24:19 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-03-17 15:24:19 +0000 |
commit | 56aa4e7a9a6846a72e9031e29555b05ed119e679 (patch) | |
tree | 4641d5f18da51bc381f952d52b922718f3cbb04f /synapse/handlers/directory.py | |
parent | Update aliases event after deletion (diff) | |
download | synapse-56aa4e7a9a6846a72e9031e29555b05ed119e679.tar.xz |
Check canonical alias event exists
Diffstat (limited to 'synapse/handlers/directory.py')
-rw-r--r-- | synapse/handlers/directory.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py index be9f2a21b2..6bcc5a5e2b 100644 --- a/synapse/handlers/directory.py +++ b/synapse/handlers/directory.py @@ -257,7 +257,8 @@ class DirectoryHandler(BaseHandler): room_id, EventTypes.CanonicalAlias, "" ) - if alias_event.content.get("alias", "") != room_alias.to_string(): + alias_str = room_alias.to_string() + if not alias_event or alias_event.content.get("alias", "") != alias_str: return msg_handler = self.hs.get_handlers().message_handler |