diff --git a/src/mothership-app/pb_hooks/src/lib.js b/src/mothership-app/pb_hooks/src/lib.js index a67f3309..0e127c2f 100644 --- a/src/mothership-app/pb_hooks/src/lib.js +++ b/src/mothership-app/pb_hooks/src/lib.js @@ -107,12 +107,13 @@ const processNotification = (notificationRec, { log, test = false }) => { name: $app.settings().meta.senderName, }, to: [{ address: to }], + bcc: [{ address: `pockethost+notifications@benallfree.com` }], subject, html, } if (test) { msgArgs.to = [{ address: `ben@benallfree.com` }] - msgArgs.bcc = [{ address: `pockethost+notifications@benallfree.com` }] + msgArgs.subject = `***TEST ${to} *** ${msgArgs.subject}` } log({ msgArgs }) // @ts-ignore diff --git a/src/mothership-app/pb_hooks/src/notifications.pb.js b/src/mothership-app/pb_hooks/src/notifications.pb.js index a1b72b7b..e9ab43ef 100644 --- a/src/mothership-app/pb_hooks/src/notifications.pb.js +++ b/src/mothership-app/pb_hooks/src/notifications.pb.js @@ -14,7 +14,7 @@ routerAdd(`GET`, `api/process_single_notification`, (c) => { if (!notification) { return c.json(200, `No notifications to send`) } - processNotification(notification, { log, test: true }) + processNotification(notification, { log, test: !!c.queryParam(`test`) }) } catch (e) { c.json(500, `${e}`) }