Generate AS registrations with bot sync workaround
Refer to tulir commit [47a1d7f]
This commit is contained in:
parent
c12ba3d64e
commit
488fa5aa1b
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue