fix: nostr zaps (#63)
This commit is contained in:
parent
5fb5aa382d
commit
efb2eef323
2 changed files with 9 additions and 3 deletions
9
tasks.py
9
tasks.py
|
|
@ -125,8 +125,15 @@ async def send_zap(payment: Payment):
|
|||
tags.append([t, tag[0]])
|
||||
tags.append(["bolt11", payment.bolt11])
|
||||
tags.append(["description", nostr])
|
||||
|
||||
pubkey = next((pk[1] for pk in tags if pk[0] == "p"), None)
|
||||
assert pubkey, "Cannot create zap receipt. Recepient pubkey is missing."
|
||||
zap_receipt = EncryptedDirectMessage(
|
||||
kind=9735, tags=tags, content=payment.extra.get("comment") or ""
|
||||
kind=9735,
|
||||
recipient_pubkey=pubkey,
|
||||
tags=tags,
|
||||
content=payment.extra.get("comment") or "",
|
||||
cleartext_content=payment.extra.get("comment") or "",
|
||||
)
|
||||
|
||||
settings = await get_or_create_lnurlp_settings()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue