Use provided filter for account_data (#2372)

* Reuse IncrementalSync, use provided filter

* Inform SyncAPI about newly created push_rules
This commit is contained in:
Till 2022-04-25 19:04:46 +02:00 committed by GitHub
parent aad81b7b4d
commit e95fc5c5e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 38 deletions

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