From 68ee11d96c8d81a398d81a02c5ba32eb9d3022ba Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 30 Jan 2020 11:20:44 +0000 Subject: [PATCH] Add empty push rules into account data on account creation (#862) --- clientapi/auth/storage/accounts/storage.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/clientapi/auth/storage/accounts/storage.go b/clientapi/auth/storage/accounts/storage.go index 020a38376..7cfc63c01 100644 --- a/clientapi/auth/storage/accounts/storage.go +++ b/clientapi/auth/storage/accounts/storage.go @@ -140,6 +140,17 @@ func (d *Database) CreateAccount( } return nil, err } + if err := d.SaveAccountData(ctx, localpart, "", "m.push_rules", `{ + "global": { + "content": [], + "override": [], + "room": [], + "sender": [], + "underride": [] + } + }`); err != nil { + return nil, err + } return d.accounts.insertAccount(ctx, localpart, hash, appserviceID) }