From e54ae05ad6f3d2cf8fe0cf15c605b4078c5393d2 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Fri, 14 Jun 2024 10:03:46 -0300 Subject: [PATCH] fix: do not return zaps without amount --- src/controllers/api/statuses.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/api/statuses.ts b/src/controllers/api/statuses.ts index 7b9e82cd..6f0b11dd 100644 --- a/src/controllers/api/statuses.ts +++ b/src/controllers/api/statuses.ts @@ -562,6 +562,8 @@ const zappedByController: AppController = async (c) => { const results = (await Promise.all( events.map(async (event) => { const amount = amountSchema.parse(event.tags.find(([name]) => name === 'amount')?.[1]); + if (amount <= 0) return; + const comment = event?.content ?? ''; const account = event?.author ? await renderAccount(event.author) : await accountFromPubkey(event.pubkey);