mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
refactoring: clean event sent to notification
This commit is contained in:
parent
da40af8a75
commit
ffbe734c9b
1 changed files with 2 additions and 3 deletions
|
@ -66,9 +66,8 @@ const notifier = {
|
||||||
|
|
||||||
async notifyEvent (action, eventId) {
|
async notifyEvent (action, eventId) {
|
||||||
|
|
||||||
const event = await Event.findByPk(eventId, {
|
const event = await Event.findByPk(eventId, { include: [ { model: Tag, attributes: ['tag'], through: { attributes: [] }}, Place],
|
||||||
include: [Tag, Place, User]
|
attributes: { exclude: ['userId', 'placeId', 'image_path', 'ap_object', 'ap_id', 'apUserApId', 'likes', 'boost'] } })
|
||||||
})
|
|
||||||
|
|
||||||
// emit this notification to plugins
|
// emit this notification to plugins
|
||||||
notifier.emitter.emit(action, event.get({ plain: true, raw: true }))
|
notifier.emitter.emit(action, event.get({ plain: true, raw: true }))
|
||||||
|
|
Loading…
Reference in a new issue