Browse Source

Merge pull request #672 from mrfelton/fix/invoice-notification

fix(invoice): only notify on settled invoices
renovate/lint-staged-8.x v0.2.1-beta
JimmyMow 6 years ago
committed by GitHub
parent
commit
8457549a82
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      app/reducers/invoice.js

10
app/reducers/invoice.js

@ -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

Loading…
Cancel
Save