diff --git a/config/registration.go b/config/registration.go index aa3b054..00922b7 100644 --- a/config/registration.go +++ b/config/registration.go @@ -33,6 +33,12 @@ func (config *Config) NewRegistration() (*appservice.Registration, error) { config.AppService.ASToken = registration.AppToken config.AppService.HSToken = registration.ServerToken + + // Workaround for https://github.com/matrix-org/synapse/pull/5758 + registration.SenderLocalpart = appservice.RandomString(32) + botRegex := regexp.MustCompile(fmt.Sprintf("^@%s:%s$", config.AppService.Bot.Username, config.Homeserver.Domain)) + registration.Namespaces.RegisterUserIDs(botRegex, true) + return registration, nil }