Only send lud12 comment if its not a private zap
This commit is contained in:
@@ -310,7 +310,7 @@ func fetch_zap_invoice(_ payreq: LNUrlPayRequest, zapreq: NostrEvent?, sats: Int
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add a lud12 comment as well if we have it
|
// add a lud12 comment as well if we have it
|
||||||
if let comment, let limit = payreq.commentAllowed, limit != 0 {
|
if zap_type != .priv, let comment, let limit = payreq.commentAllowed, limit != 0 {
|
||||||
let limited_comment = String(comment.prefix(limit))
|
let limited_comment = String(comment.prefix(limit))
|
||||||
query.append(URLQueryItem(name: "comment", value: limited_comment))
|
query.append(URLQueryItem(name: "comment", value: limited_comment))
|
||||||
}
|
}
|
||||||
@@ -323,7 +323,15 @@ func fetch_zap_invoice(_ payreq: LNUrlPayRequest, zapreq: NostrEvent?, sats: Int
|
|||||||
|
|
||||||
print("url \(url)")
|
print("url \(url)")
|
||||||
|
|
||||||
guard let ret = try? await URLSession.shared.data(from: url) else {
|
var ret: (Data, URLResponse)? = nil
|
||||||
|
do {
|
||||||
|
ret = try await URLSession.shared.data(from: url)
|
||||||
|
} catch {
|
||||||
|
print(error.localizedDescription)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
guard let ret else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user