Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(meta): add lightning address as metadata #279

Merged
merged 1 commit into from
Feb 12, 2022
Merged

feat(meta): add lightning address as metadata #279

merged 1 commit into from
Feb 12, 2022

Conversation

dergigi
Copy link
Owner

@dergigi dergigi commented Feb 12, 2022

For Alby's value4value extension: https://getalby.com/value4value

@dergigi dergigi self-assigned this Feb 12, 2022
@dergigi dergigi merged commit e634a8a into master Feb 12, 2022
@dergigi dergigi deleted the alby branch February 12, 2022 21:08
@dergigi
Copy link
Owner Author

dergigi commented Feb 17, 2022

Official spec here: BitcoinAndLightningLayerSpecs/rfc#1

<!-- Lightning Address for Alby's Value4Value extensions -->
{% capture shortName %}{{ page.redirect_from | replace: '/', '' }}{% endcapture %}
{% capture lightningAddress %}{% if shortName %}{{ shortName }}{% else %}{{ 's@ts.dergigi.com' }}{% endif %}{% endcapture %}
<meta name="lightning" content="lnurlp:{{ lightningAddress }}"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to send some sats and test it, but it seems your lightningAddress is empty here. jfyi. :)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ich habe keine Ahnung von liquid templates, aber muss das sowas sein?

{% capture lightningAddress %}{% if shortName != '' %}{{ shortName | append: "@ts.dergigi.com" }}{% else %}{{ 's@ts.dergigi.com' }}{% endif %}{% endcapture %}

also wenn der shortName nicht ein empty string ist (der shortName wird auf '' gesetzt und ist deshalb bisher truthy) dann soll die addresse {shortName}@ts.dergigi.com sein, ansonsten s@ts.dergigi.com

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vielleicht auch:

{% capture lightningAddress %}{% if shortName == blank %}{{ 's@ts.dergigi.com' }}{% else %}{{ shortName | append: "@ts.dergigi.com" }}{% endif %}{% endcapture %}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Should be fixed with #288 - might take a minute or two until it is live. Tested it on local, and it truly should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants