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 3ba333e802 - Show all commits

View File

@@ -69,26 +69,26 @@ class LnurlpayController < ApplicationController
private
def find_user
@user = User.where(cn: params[:username], ou: Setting.primary_domain).first
http_status :not_found if @user.nil?
end
def find_user
@user = User.where(cn: params[:username], ou: Setting.primary_domain).first
http_status :not_found if @user.nil?
end
def metadata(address)
"[[\"text/identifier\", \"#{address}\"], [\"text/plain\", \"Send sats, receive thanks.\"]]"
end
def metadata(address)
"[[\"text/identifier\", \"#{address}\"], [\"text/plain\", \"Send sats, receive thanks.\"]]"
end
def valid_amount?(amount_in_sats)
amount_in_sats <= MAX_SATS && amount_in_sats >= MIN_SATS
end
def valid_amount?(amount_in_sats)
amount_in_sats <= MAX_SATS && amount_in_sats >= MIN_SATS
end
def valid_comment?(comment)
comment.length <= MAX_COMMENT_CHARS
end
def valid_comment?(comment)
comment.length <= MAX_COMMENT_CHARS
end
private
private
def check_service_available
http_status :not_found unless Setting.lndhub_enabled?
end
def check_service_available
http_status :not_found unless Setting.lndhub_enabled?
end
end