diff --git a/back/methods/notification/send.js b/back/methods/notification/send.js index 2adb9c5f5..ca11889ec 100644 --- a/back/methods/notification/send.js +++ b/back/methods/notification/send.js @@ -34,7 +34,10 @@ module.exports = Self => { include: { relation: 'user', scope: { - fields: ['name', 'lang'] + fields: ['name', 'email', 'lang'], + include: { + relation: 'emailUser' + } } } } @@ -55,7 +58,7 @@ module.exports = Self => { for (const notificationUser of queue.notification().subscription()) { try { const sendParams = { - recipient: notificationUser.user().name + '@verdnatura.es', + recipient: notificationUser.user().emailUser().email, lang: notificationUser.user().lang };