mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-17 02:53:11 -06:00
Remove dead, untested code from userIDIsWithinApplicationServiceNamespace
This commit is contained in:
parent
40938d27b0
commit
11e16a7e20
|
|
@ -139,33 +139,18 @@ func userIDIsWithinApplicationServiceNamespace(
|
|||
return false
|
||||
}
|
||||
|
||||
if appservice != nil {
|
||||
if appservice.SenderLocalpart == local {
|
||||
return true
|
||||
}
|
||||
|
||||
// Loop through given application service's namespaces and see if any match
|
||||
for _, namespace := range appservice.NamespaceMap["users"] {
|
||||
// AS namespaces are checked for validity in config
|
||||
if namespace.RegexpObject.MatchString(userID) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
if appservice.SenderLocalpart == local {
|
||||
return true
|
||||
}
|
||||
|
||||
// Loop through all known application service's namespaces and see if any match
|
||||
for _, knownAppService := range cfg.Derived.ApplicationServices {
|
||||
if knownAppService.SenderLocalpart == local {
|
||||
// Loop through given application service's namespaces and see if any match
|
||||
for _, namespace := range appservice.NamespaceMap["users"] {
|
||||
// AS namespaces are checked for validity in config
|
||||
if namespace.RegexpObject.MatchString(userID) {
|
||||
return true
|
||||
}
|
||||
for _, namespace := range knownAppService.NamespaceMap["users"] {
|
||||
// AS namespaces are checked for validity in config
|
||||
if namespace.RegexpObject.MatchString(userID) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue