Merge branch 'master' into dev
This commit is contained in:
@@ -62,13 +62,15 @@ module.exports = {
|
||||
// announcement: 'TODO: HTML First presentation post'
|
||||
// })
|
||||
|
||||
// send confirmed events to mastodon
|
||||
await Notification.create({ action: 'Create', type: 'ap', filters: { is_visible: true } })
|
||||
await Notification.create({ action: 'Update', type: 'ap', filters: { is_visible: true } })
|
||||
await Notification.create({ action: 'Delete', type: 'ap', filters: { is_visible: true } })
|
||||
// try {
|
||||
|
||||
// send anon events to admin
|
||||
await Notification.create({ action: 'Create', type: 'admin_email', filters: { is_visible: false } })
|
||||
// // send confirmed events to mastodon
|
||||
await Notification.create({ action: 'Create', type: 'ap', filters: '{ "is_visible": true }' })
|
||||
await Notification.create({ action: 'Update', type: 'ap', filters: '{ "is_visible": true }' })
|
||||
await Notification.create({ action: 'Delete', type: 'ap', filters: '{ "is_visible": true }' })
|
||||
// // send anon events to admin
|
||||
await Notification.create({ action: 'Create', type: 'admin_email', filters: '{ "is_visible": false }' })
|
||||
// }
|
||||
|
||||
// TODO email's notifications
|
||||
// await db.notification.create({ action: 'Create', type: 'email', filters: { is_visible: true } })
|
||||
|
||||
20
server/migrations/20201103161446-notification_queue.js
Normal file
20
server/migrations/20201103161446-notification_queue.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = {
|
||||
up: (queryInterface, Sequelize) => {
|
||||
return queryInterface.bulkInsert('notifications', [
|
||||
|
||||
// send AP message
|
||||
{ action: 'Create', type: 'ap', filters: '{ "is_visible": true }', createdAt: new Date(), updatedAt: new Date() },
|
||||
{ action: 'Update', type: 'ap', filters: '{ "is_visible": true }', createdAt: new Date(), updatedAt: new Date() },
|
||||
{ action: 'Delete', type: 'ap', filters: '{ "is_visible": true }', createdAt: new Date(), updatedAt: new Date() },
|
||||
|
||||
// send anon event to admin
|
||||
{ action: 'Create', type: 'admin_email', filters: '{ "is_visible": false }', createdAt: new Date(), updatedAt: new Date() }
|
||||
]).catch(e => { })
|
||||
},
|
||||
|
||||
down: (queryInterface, Sequelize) => {
|
||||
return queryInterface.bulkDelete('notification')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user