Merge branch 'fix-zap-remove-user-field-check' into 'main'
Allow zap request event to proceed even if it does not have a 'user' field See merge request soapbox-pub/ditto!327
This commit is contained in:
commit
a690fa3096
|
@ -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