diff --git a/src/github.com/matrix-org/dendrite/common/config/appservice.go b/src/github.com/matrix-org/dendrite/common/config/appservice.go index e9e0158d5..10bc2deb3 100644 --- a/src/github.com/matrix-org/dendrite/common/config/appservice.go +++ b/src/github.com/matrix-org/dendrite/common/config/appservice.go @@ -189,9 +189,7 @@ func checkErrors(config *Dendrite) (err error) { } // Check if the url has trailing /'s. If so, remove them - for strings.HasSuffix(appservice.URL, "/") { - appservice.URL = strings.TrimSuffix(appservice.URL, "/") - } + appservice.URL = strings.TrimRight(appservice.URL, "/") // Check if we've already seen this ID. No two application services // can have the same ID or token.