From f9a3d03f356d7ed2072772b86c7776f62dcd32b5 Mon Sep 17 00:00:00 2001 From: CyberMew Date: Sun, 3 Jan 2021 15:05:36 +0800 Subject: [PATCH] feat(pushover): add screenshot to push notification if available (#1552) --- src/notification/pushover.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/notification/pushover.ts b/src/notification/pushover.ts index 84689bf459..5823d4a973 100644 --- a/src/notification/pushover.ts +++ b/src/notification/pushover.ts @@ -19,14 +19,16 @@ export function sendPushoverNotification(link: Link, store: Store) { ? { message: link.cartUrl ? link.cartUrl : link.url, priority: pushover.priority, - title: Print.inStock(link, store) + title: Print.inStock(link, store), + ...(link.screenshot && {file: `./${link.screenshot}`}) } : { expire: pushover.expire, message: link.cartUrl ? link.cartUrl : link.url, priority: pushover.priority, retry: pushover.retry, - title: Print.inStock(link, store) + title: Print.inStock(link, store), + ...(link.screenshot && {file: `./${link.screenshot}`}) }; push.send(message, (error: Error) => {