From 0e4b467b3c931c4dc219a0da35653d9cbfc87e0a Mon Sep 17 00:00:00 2001 From: k00b Date: Wed, 19 Mar 2025 11:44:15 -0500 Subject: [PATCH] make expire boost exclude unpaid invoices --- worker/expireBoost.js | 1 + 1 file changed, 1 insertion(+) diff --git a/worker/expireBoost.js b/worker/expireBoost.js index b538f84c..815157a4 100644 --- a/worker/expireBoost.js +++ b/worker/expireBoost.js @@ -14,6 +14,7 @@ export async function expireBoost ({ data: { id }, models }) { FROM "ItemAct" WHERE act = 'BOOST' AND "itemId" = ${Number(id)}::INTEGER + AND "invoiceActionState" IS NULL OR "invoiceActionState" = 'PAID' ) UPDATE "Item" SET boost = COALESCE(boost.cur_msats, 0) / 1000, "oldBoost" = COALESCE(boost.old_msats, 0) / 1000