diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-04-25 19:04:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 19:04:46 +0200 |
commit | e95fc5c5e3e4945949fbc1e9036c599687925a4d (patch) | |
tree | d3f8f62d96eb310cc63b3985328c71d66c0f8efe /userapi | |
parent | aad81b7b4dcf971508cde266c5ae99e35261bf27 (diff) |
Use provided filter for account_data (#2372)
* Reuse IncrementalSync, use provided filter
* Inform SyncAPI about newly created push_rules
Diffstat (limited to 'userapi')
-rw-r--r-- | userapi/internal/api.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/userapi/internal/api.go b/userapi/internal/api.go index d1c12f05..be58e2d8 100644 --- a/userapi/internal/api.go +++ b/userapi/internal/api.go @@ -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 |