Skip to content

Commit

Permalink
feat(pushover): add screenshot to push notification if available (#1552)
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberMew committed Jan 3, 2021
1 parent 9ef83fd commit f9a3d03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/notification/pushover.ts
Expand Up @@ -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) => {
Expand Down

0 comments on commit f9a3d03

Please sign in to comment.