Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #672 from mrfelton/fix/invoice-notification
Browse files Browse the repository at this point in the history
fix(invoice): only notify on settled invoices
  • Loading branch information
JimmyMow authored Aug 15, 2018
2 parents 1f20907 + b1be3f4 commit 8457549
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/reducers/invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,13 @@ export const invoiceUpdate = (event, { invoice }) => dispatch => {
// Fetch new balance
dispatch(fetchBalance())

// HTML 5 desktop notification for the invoice update
const notifTitle = "You've been Zapped"
const notifBody = 'Congrats, someone just paid an invoice of yours'
if (invoice.settled) {
// HTML 5 desktop notification for the invoice update
const notifTitle = "You've been Zapped"
const notifBody = 'Congrats, someone just paid an invoice of yours'

showNotification(notifTitle, notifBody)
showNotification(notifTitle, notifBody)
}
}
// ------------------------------------
// Action Handlers
Expand Down

0 comments on commit 8457549

Please sign in to comment.