Consider a tag

This commit is contained in:
Believethehype
2024-05-21 23:32:42 +02:00
parent 89e9bc1011
commit 4c06b96975
2 changed files with 8 additions and 1 deletions
-1
View File
@@ -88,7 +88,6 @@ require (
github.com/lnpay/lnpay-go v1.1.0
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.58 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
+8
View File
@@ -437,6 +437,14 @@ func CreateNostrReceipt(zapEvent nostr.Event, invoice string) (nostr.Event, erro
nip57Receipt.Tags = nip57Receipt.Tags.AppendUnique(*eTag)
}
if aTags := zapEvent.Tags.GetAll([]string{"a"}); aTags != nil {
for _, s := range aTags {
if s.Key() == "a" {
nip57Receipt.Tags = nip57Receipt.Tags.AppendUnique(s)
}
}
}
err = nip57Receipt.Sign(nostrPrivkeyHex)
if err != nil {
return nostr.Event{}, err