From 7d27a6e890b84387611fc67a0b94ded33e5697ab Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Sat, 19 Oct 2024 23:16:04 -0300 Subject: [PATCH] refactor: rewrite if statement --- src/controllers/api/statuses.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/api/statuses.ts b/src/controllers/api/statuses.ts index 3250fc19..8e66f7cb 100644 --- a/src/controllers/api/statuses.ts +++ b/src/controllers/api/statuses.ts @@ -224,7 +224,7 @@ const createStatusController: AppController = async (c) => { dittoZapSplit[zapPubkey].message, ]); } - if (pubkey in dittoZapSplit === false) { + if (totalSplit && !dittoZapSplit[pubkey]) { tags.push(['zap', pubkey, Conf.relay, Math.max(0, 100 - totalSplit).toString()]); } }