refactoring: clean event sent to notification

This commit is contained in:
lesion 2024-06-26 15:35:18 +02:00
parent da40af8a75
commit ffbe734c9b
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -66,9 +66,8 @@ const notifier = {
async notifyEvent (action, eventId) {
const event = await Event.findByPk(eventId, {
include: [Tag, Place, User]
})
const event = await Event.findByPk(eventId, { include: [ { model: Tag, attributes: ['tag'], through: { attributes: [] }}, Place],
attributes: { exclude: ['userId', 'placeId', 'image_path', 'ap_object', 'ap_id', 'apUserApId', 'likes', 'boost'] } })
// emit this notification to plugins
notifier.emitter.emit(action, event.get({ plain: true, raw: true }))