check for anonymous Zaps and show im DM instead of random key

This commit is contained in:
Believethehype
2023-04-11 19:45:39 +02:00
parent eddaf5cc2f
commit 451d7ca691
+5 -2
View File
@@ -280,11 +280,14 @@ func serveLNURLpSecond(w http.ResponseWriter, params *Params, username string, a
if zapEvent.Tags.GetFirst([]string{"e"}) != nil {
note = "@" + EncodeBench32Note(zapEvent.Tags.GetFirst([]string{"e"}).Value())
}
if zapEvent.Tags.GetFirst([]string{"anon"}) != nil {
if zapEvent.Tags.GetFirst([]string{"anon"}).Value() == "" {
sender = "anonymous Zapper 🤙"
}
}
log.Debug().Str("Zap from", sender).Msg("Nostr")
}
//var sender = zapEvent.Tags.GetFirst([]string{"pubkey"})
decoded_invoice, _ := decodepay.Decodepay(invoice)
return LNURLPayValuesCustom{
LNURLResponse: lnurl.LNURLResponse{Status: "OK"},