Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
les
gancio
Commits
f629b0a1
Commit
f629b0a1
authored
Oct 02, 2019
by
les
Browse files
[feat] create default ap/email notifications on setup
parent
5fa8bc5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/firstrun.js
View file @
f629b0a1
...
...
@@ -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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment