From dc2c73dccbb9ffa2c82142bcbb8be6ac78dbdf23 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 29 Jun 2018 14:31:49 +0100 Subject: [PATCH] Allow multiple regexes per as namespace Signed-off-by: Andrew Morgan --- .../matrix-org/dendrite/common/config/appservice.go | 12 ------------ 1 file changed, 12 deletions(-) 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 0333b3389..178788e3c 100644 --- a/src/github.com/matrix-org/dendrite/common/config/appservice.go +++ b/src/github.com/matrix-org/dendrite/common/config/appservice.go @@ -207,18 +207,6 @@ func checkErrors(config *Dendrite) (err error) { idMap[appservice.ID] = true tokenMap[appservice.ASToken] = true - // Check if more than one regex exists per namespace - for _, namespace := range appservice.NamespaceMap { - if len(namespace) > 1 { - // It's quite easy to accidentally make multiple regex objects per - // namespace, which often ends up in an application service receiving events - // it doesn't want, as an empty regex will match all events. - return configErrors([]string{fmt.Sprintf( - "Application service namespace can only contain a single regex tuple. Check your YAML.", - )}) - } - } - // TODO: Remove once rate_limited is implemented if appservice.RateLimited { log.Warn("WARNING: Application service option rate_limited is currently unimplemented")