fix(pipeline-zap): allow 'event' to proceed even without 'user' field
This commit is contained in:
parent
11474c5cbd
commit
a519637bee
|
@ -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]);
|
||||||
|
|
Loading…
Reference in New Issue