fix(pipeline-zap): allow 'event' to proceed even without 'user' field

This commit is contained in:
P. Reis 2024-05-28 17:40:10 -03:00
parent 11474c5cbd
commit a519637bee
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ function processMedia({ tags, pubkey, user }: DittoEvent) {
/** Emit Nostr Wallet Connect event from zaps so users may pay. */ /** Emit Nostr Wallet Connect event from zaps so users may pay. */
async function payZap(event: DittoEvent, signal: AbortSignal) { async function payZap(event: DittoEvent, signal: AbortSignal) {
if (event.kind !== 9734 || !event.user) return; if (event.kind !== 9734) return;
const lnurl = event.tags.find(([name]) => name === 'lnurl')?.[1]; const lnurl = event.tags.find(([name]) => name === 'lnurl')?.[1];
const amount = Number(event.tags.find(([name]) => name === 'amount')?.[1]); const amount = Number(event.tags.find(([name]) => name === 'amount')?.[1]);