diff options
| author | Adam Soltys <[email protected]> | 2022-10-06 01:15:21 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-06 01:15:21 -0700 |
| commit | 642306ff14d774b3ec3ccd5c9174639b86d6f7c4 (patch) | |
| tree | 6814209fa80a8a40bfc8c01f11ff8139740ab9ce /lib/sendInternal.js | |
| parent | ea44c7ea627d4b4e56a9819b992c6fb6d24eaa1a (diff) | |
| download | coinos-server-642306ff14d774b3ec3ccd5c9174639b86d6f7c4.tar.gz coinos-server-642306ff14d774b3ec3ccd5c9174639b86d6f7c4.zip | |
send invoice with payment message
Diffstat (limited to 'lib/sendInternal.js')
| -rw-r--r-- | lib/sendInternal.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sendInternal.js b/lib/sendInternal.js index e8e5e1b6..554dde91 100644 --- a/lib/sendInternal.js +++ b/lib/sendInternal.js @@ -176,6 +176,9 @@ export default async ( if (invoice) { params.invoice_id = invoice.id; + await invoice.increment({ received: amount }, { transaction }); + await invoice.reload({ transaction }); + let c = store.convert[invoice.text]; if (c) { l( @@ -200,6 +203,8 @@ export default async ( p2 = p2.get({ plain: true }); p2.account = a2.get({ plain: true }); + if (invoice) p2.invoice = invoice.get({ plain: true }); + emit(recipient.username, "payment", p2); emit(recipient.username, "account", p2.account); |
