mirror of
https://github.com/pockethost/pockethost.git
synced 2026-03-13 03:49:58 +00:00
update notification test mode
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user