Announce nostr pubkey on lnurlp endpoint
This commit is contained in:
parent
46b4723999
commit
f2507409a3
@ -8,7 +8,7 @@ class LnurlpayController < ApplicationController
|
|||||||
|
|
||||||
# GET /.well-known/lnurlp/:username
|
# GET /.well-known/lnurlp/:username
|
||||||
def index
|
def index
|
||||||
render json: {
|
res = {
|
||||||
status: "OK",
|
status: "OK",
|
||||||
callback: "https://#{Setting.accounts_domain}/lnurlpay/#{@user.cn}/invoice",
|
callback: "https://#{Setting.accounts_domain}/lnurlpay/#{@user.cn}/invoice",
|
||||||
tag: "payRequest",
|
tag: "payRequest",
|
||||||
@ -17,6 +17,13 @@ class LnurlpayController < ApplicationController
|
|||||||
metadata: metadata(@user.address),
|
metadata: metadata(@user.address),
|
||||||
commentAllowed: MAX_COMMENT_CHARS
|
commentAllowed: MAX_COMMENT_CHARS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if Setting.nostr_enabled? && Setting.nostr_private_key.present?
|
||||||
|
res[:allows_nostr] = true
|
||||||
|
res[:nostrPubkey] = Setting.nostr_public_key
|
||||||
|
end
|
||||||
|
|
||||||
|
render json: res
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /.well-known/keysend/:username
|
# GET /.well-known/keysend/:username
|
||||||
|
Loading…
x
Reference in New Issue
Block a user