diff options
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}` ); |
