diff options
| author | Adam Soltys <[email protected]> | 2023-11-23 23:39:15 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-11-23 23:39:19 +0000 |
| commit | 3d38a3656103b117fe1e68fa23aca3c1410fa969 (patch) | |
| tree | 36439ccee411ff8da6699f5ab160d1399065361c /lib/payments.js | |
| parent | ab44bc3815c233a16586eada624672ff03e51224 (diff) | |
| download | coinos-server-3d38a3656103b117fe1e68fa23aca3c1410fa969.tar.gz coinos-server-3d38a3656103b117fe1e68fa23aca3c1410fa969.zip | |
new printer endpoints
Diffstat (limited to 'lib/payments.js')
| -rw-r--r-- | lib/payments.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/payments.js b/lib/payments.js index f39e2937..148a6ea1 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -14,7 +14,7 @@ import ffmpeg from "fluent-ffmpeg"; import fs from "fs"; import EventEmitter from "events"; import crc32 from "buffer-crc32"; -import mqtt from "$lib/mqtt"; +import { mqtt1, mqtt2 } from "$lib/mqtt"; export const types = { internal: "internal", @@ -176,7 +176,12 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => { notify(user, `Received ${amount} sats`); callWebhook(invoice, p); - mqtt.publish( + mqtt1.publish( + username, + `pay:${p.amount}:${p.tip}:${p.rate}:${p.created}:${p.id}` + ); + + mqtt2.publish( username, `pay:${p.amount}:${p.tip}:${p.rate}:${p.created}:${p.id}` ); |
