From 77b2f9cbd9dbfe6522e70108e5e8797417cfe9d8 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 18 Nov 2022 10:25:25 +0100 Subject: [PATCH] user emailUser --- back/methods/notification/send.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 };