mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 15:03:09 -06:00
Remove dead, untested code from userIDIsWithinApplicationServiceNamespace
This commit is contained in:
parent
55bc0f6807
commit
aafb13f616
|
|
@ -139,33 +139,18 @@ func userIDIsWithinApplicationServiceNamespace(
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if appservice != nil {
|
if appservice.SenderLocalpart == local {
|
||||||
if appservice.SenderLocalpart == local {
|
return true
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop through all known application service's namespaces and see if any match
|
// Loop through given application service's namespaces and see if any match
|
||||||
for _, knownAppService := range cfg.Derived.ApplicationServices {
|
for _, namespace := range appservice.NamespaceMap["users"] {
|
||||||
if knownAppService.SenderLocalpart == local {
|
// AS namespaces are checked for validity in config
|
||||||
|
if namespace.RegexpObject.MatchString(userID) {
|
||||||
return true
|
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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue