Add support for Lightning Zaps #190

Merged
raucao merged 25 commits from feature/170-nostr_zaps into master 2024-06-03 16:44:49 +00:00
Showing only changes of commit f2507409a3 - Show all commits

View File

@@ -8,7 +8,7 @@ class LnurlpayController < ApplicationController
# GET /.well-known/lnurlp/:username
def index
render json: {
res = {
status: "OK",
callback: "https://#{Setting.accounts_domain}/lnurlpay/#{@user.cn}/invoice",
tag: "payRequest",
@@ -17,6 +17,13 @@ class LnurlpayController < ApplicationController
metadata: metadata(@user.address),
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
# GET /.well-known/keysend/:username