From ca7873ad223897426c4fe1e3da14b9d360172a48 Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Mon, 25 Apr 2022 16:38:04 +0200 Subject: [PATCH] Inform SyncAPI about newly created push_rules --- userapi/internal/api.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/userapi/internal/api.go b/userapi/internal/api.go index d1c12f05f..be58e2d8d 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