Remove dead, untested code from userIDIsWithinApplicationServiceNamespace

This commit is contained in:
Sijmen Schoon 2023-01-10 22:32:52 +01:00 committed by KuhnChris
parent 55bc0f6807
commit aafb13f616

View file

@ -139,7 +139,6 @@ func userIDIsWithinApplicationServiceNamespace(
return false
}
if appservice != nil {
if appservice.SenderLocalpart == local {
return true
}
@ -151,21 +150,7 @@ func userIDIsWithinApplicationServiceNamespace(
return true
}
}
return false
}
// Loop through all known application service's namespaces and see if any match
for _, knownAppService := range cfg.Derived.ApplicationServices {
if knownAppService.SenderLocalpart == local {
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
}