mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
fix: do not return zaps without amount
This commit is contained in:
parent
e912210589
commit
e54ae05ad6
1 changed files with 2 additions and 0 deletions
|
|
@ -562,6 +562,8 @@ const zappedByController: AppController = async (c) => {
|
||||||
const results = (await Promise.all(
|
const results = (await Promise.all(
|
||||||
events.map(async (event) => {
|
events.map(async (event) => {
|
||||||
const amount = amountSchema.parse(event.tags.find(([name]) => name === 'amount')?.[1]);
|
const amount = amountSchema.parse(event.tags.find(([name]) => name === 'amount')?.[1]);
|
||||||
|
if (amount <= 0) return;
|
||||||
|
|
||||||
const comment = event?.content ?? '';
|
const comment = event?.content ?? '';
|
||||||
const account = event?.author ? await renderAccount(event.author) : await accountFromPubkey(event.pubkey);
|
const account = event?.author ? await renderAccount(event.author) : await accountFromPubkey(event.pubkey);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue