feat(pushover): add screenshot to push notification if available (#1552)

This commit is contained in:
CyberMew
2021-01-03 15:05:36 +08:00
committed by GitHub
parent 9ef83fd1d2
commit f9a3d03f35
+4 -2
View File
@@ -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) => {