diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-01-30 11:20:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 11:20:44 +0000 |
commit | 68ee11d96c8d81a398d81a02c5ba32eb9d3022ba (patch) | |
tree | d89d607ce0c9228778ef55dab400e40300b197c7 /clientapi | |
parent | 6885c10083cc05494d4bfad43968355666c233a5 (diff) |
Add empty push rules into account data on account creation (#862)
Diffstat (limited to 'clientapi')
-rw-r--r-- | clientapi/auth/storage/accounts/storage.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clientapi/auth/storage/accounts/storage.go b/clientapi/auth/storage/accounts/storage.go index 020a3837..7cfc63c0 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) } |