From f629b0a162118896f496e999d97160c71dc5656d Mon Sep 17 00:00:00 2001 From: les Date: Wed, 2 Oct 2019 20:57:21 +0200 Subject: [PATCH] [feat] create default ap/email notifications on setup --- server/firstrun.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/server/firstrun.js b/server/firstrun.js index b3595e79..d0ea6acc 100644 --- a/server/firstrun.js +++ b/server/firstrun.js @@ -64,11 +64,15 @@ module.exports = { consola.info('Add default notification') // send confirmed event to mastodon - await db.notification.create({ type: 'mastodon', filters: { is_visible: true } }) - await db.notification.create({ type: 'email', filters: { is_visible: true } }) + await db.notification.create({ action: 'Create', type: 'ap', filters: { is_visible: true } }) + await db.notification.create({ action: 'Update', type: 'ap', filters: { is_visible: true } }) + await db.notification.create({ action: 'Delete', type: 'ap', filters: { is_visible: true } }) - // send every event to admin - await db.notification.create({ type: 'admin_email' }) + // send anon email to administrator + await db.notification.create({ action: 'Create', type: 'admin_email', filters: { is_visible: false } }) + + // TODO + // await db.notification.create({ action: 'Create', type: 'email', filters: { is_visible: true } }) // close db connection await db.sequelize.close()