I am trying to open a "lightning:lnurl" link, and only my local wallet gets triggered for it, not alby.
Discussion
which website? can I review this?
https://milefashell.pythonanywhere.com/lnurl/codepsychology@legend.lnbits.com
This website shall automatically launch lightning apps through openning an "lightning:lnaddress/lnurl/lninvoice" address.
nostr:npub1getal6ykt05fsz5nqu4uld09nfj3y3qxmv8crys4aeut53unfvlqr80nfm could you find out something?
nostr:npub1getal6ykt05fsz5nqu4uld09nfj3y3qxmv8crys4aeut53unfvlqr80nfm
WebLN seems a solution to me.
Somehow the "lightning://" url scheme does not trigger alby, but with WebLN, alby gets triggered.
ah yes, that's because you set window.location.href=
this can not be detected by the extension and because lightning is no official protocol no handler can be registered (the browser passes over to the OS)
as you use JS anyway you should do this:
if (window.webln && window.webln.lnurl) {
window.webln.enable().then(() => { window.webln.lnurl("....") });
} else {
window.location.href= "..."
}
use webln when available, otherwise do the redirect as currently.
Thanks! 💜