Improve lnurlp message and notification
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Râu Cao 2023-01-25 13:18:44 +08:00
parent 4a045bf61c
commit 8f9e1c3e84
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class LnurlpayController < ApplicationController
return return
end end
memo = "Sats for #{address}" memo = "To #{address}"
memo = "#{memo}: \"#{comment}\"" if comment.present? memo = "#{memo}: \"#{comment}\"" if comment.present?
payment_request = @user.ln_create_invoice({ payment_request = @user.ln_create_invoice({

View File

@ -27,7 +27,7 @@ class WebhooksController < ApplicationController
from: "kosmos.org", # TODO domain config from: "kosmos.org", # TODO domain config
to: address, to: address,
subject: "Sats received!", subject: "Sats received!",
body: "#{amt_sats} sats received in your wallet. Memo: \"#{memo}\"" body: "#{amt_sats} sats received in your Lightning wallet:\n> #{memo}"
} }
XmppSendMessageJob.perform_later(payload) XmppSendMessageJob.perform_later(payload)
end end