mirror of
https://github.com/element-hq/synapse.git
synced 2026-06-04 06:01:23 +00:00
Check canonical alias event exists
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user