From f42ce18b4fd901eeaebfdccd19d0db1253c497d6 Mon Sep 17 00:00:00 2001 From: Cnly Date: Thu, 11 Jul 2019 01:49:59 +0800 Subject: [PATCH] Comment on using SenderLocalpart as UserID Signed-off-by: Alex Chen --- clientapi/routing/directory.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clientapi/routing/directory.go b/clientapi/routing/directory.go index 96e5d4348..ab85e86a9 100644 --- a/clientapi/routing/directory.go +++ b/clientapi/routing/directory.go @@ -117,6 +117,8 @@ func SetLocalAlias( // 1. The new method for checking for things matching an AS's namespace // 2. Using an overall Regex object for all AS's just like we did for usernames for _, appservice := range cfg.Derived.ApplicationServices { + // Don't prevent AS from creating aliases in its own namespace + // Note that Dendrite uses SenderLocalpart as UserID for AS users if device.UserID != appservice.SenderLocalpart { if aliasNamespaces, ok := appservice.NamespaceMap["aliases"]; ok { for _, namespace := range aliasNamespaces {