fix notifications

This commit is contained in:
les
2020-07-08 00:57:28 +02:00
parent 0a51c42fe0
commit 5a5c62efb4
5 changed files with 24 additions and 26 deletions

View File

@@ -305,10 +305,11 @@ const eventController = {
// without waiting for the task manager
if (event.recurrent) {
eventController._createRecurrent()
} else {
// send notifications (mastodon / email)
const notifier = require('../../notifier')
notifier.notifyEvent('Create', event.id)
}
// send notifications (mastodon / email)
const notifier = require('../../notifier')
notifier.notifyEvent('Create', event.id)
} catch (e) {
debug(e)
res.sendStatus(400)
@@ -373,10 +374,10 @@ const eventController = {
// without waiting for the task manager
if (event.recurrent) {
eventController._createRecurrent()
} else {
const notifier = require('../../notifier')
notifier.notifyEvent('Update', event.id)
}
const notifier = require('../../notifier')
notifier.notifyEvent('Update', event.id)
},
async remove (req, res) {