fix: do not wait for Delete notification

This commit is contained in:
lesion 2024-09-25 23:29:17 +02:00
parent 82578b94c3
commit 65ba7054fb
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -731,11 +731,6 @@ const eventController = {
} }
} }
// notify local events only
if (!event.ap_id) {
await notifier.notifyEvent('Delete', event.id)
}
// unassociate child events // unassociate child events
if (event.recurrent) { if (event.recurrent) {
await Event.update({ parentId: null }, { where: { parentId: event.id } }) await Event.update({ parentId: null }, { where: { parentId: event.id } })
@ -753,6 +748,13 @@ const eventController = {
} }
res.sendStatus(200) res.sendStatus(200)
// notify local events only
if (!event.ap_id) {
notifier.notifyEvent('Delete', event.id)
}
} else { } else {
res.sendStatus(403) res.sendStatus(403)
} }