Inform SyncAPI about newly created push_rules

This commit is contained in:
Till Faelligen 2022-04-25 16:38:04 +02:00
parent 9f239cfcf3
commit ca7873ad22

View file

@ -90,6 +90,13 @@ func (a *UserInternalAPI) PerformAccountCreation(ctx context.Context, req *api.P
return nil
}
// Inform the SyncAPI about the newly created push_rules
if err = a.SyncProducer.SendAccountData(acc.UserID, "", "m.push_rules"); err != nil {
util.GetLogger(ctx).WithFields(logrus.Fields{
"user_id": acc.UserID,
}).WithError(err).Warn("failed to send account data to the SyncAPI")
}
if req.AccountType == api.AccountTypeGuest {
res.AccountCreated = true
res.Account = acc