lightning-browser-extension icon indicating copy to clipboard operation
lightning-browser-extension copied to clipboard

feat: tipping support for mastodon

Open reneaaron opened this issue 2 years ago • 11 comments

Link this PR to an issue

Fixes #476

Type of change (Remove other not matching type)

  • New feature (non-breaking change which adds functionality)

Describe the changes you have made in this PR -

Tipping support for Mastodon instances.

  • bitcoinhackers.org
  • kosmos.social

How Has This Been Tested?

✅ Tipped on bitcoinhackers.com

Checklist:

  • [ ] My code follows the style guidelines of this project and performed a self-review of my own code
  • [ ] New and existing tests pass locally with my changes
  • [ ] I checked if I need to make corresponding changes to the documentation (and made those changes if needed)

reneaaron avatar Apr 26 '22 12:04 reneaaron

@bumi I just added tipping support for Mastodon instances. There are a few questions left that I wanted to clarify before submitting the MR for review:

  1. Mastodon instances I've added bitcoinhackers.org and kosmos.social that were mentioned in the original issue already, are there any other instances you'd want to support?

  2. Where to search for Currently we only look for lightning addresses / LNURLP in the bio. In the original issue there was also this idea of supporting the original profile email. However I don't know how we want to know weather an email is a lightning address at this point? 🤔

reneaaron avatar Apr 26 '22 12:04 reneaaron

re 1: we should add mastodon.social and let's ask on twitter?

re 2. we could also use custom profile metadata: image I'd say the bio and a custom lightning meta data profile entry?

bumi avatar Apr 30 '22 22:04 bumi

re 1: we should add mastodon.social and let's ask on twitter?

Good idea, let's do a poll again!

re 2. we could also use custom profile metadata: image I'd say the bio and a custom lightning meta data profile entry?

Sure, let's include that as well. 👍

reneaaron avatar May 01 '22 19:05 reneaaron

Here is a list of instances: https://joinmastodon.org/communities

bumi avatar May 01 '22 22:05 bumi

maybe we can also make a PR to officially add it to Mastodon: https://github.com/mastodon/mastodon ?
edit: I don't think so, they seem to only have stupid text key-value pairs in the profile.

bumi avatar May 01 '22 23:05 bumi

the twitter poll: https://twitter.com/getAlby/status/1520899495835635712

bumi avatar May 02 '22 17:05 bumi

@reneaaron could you send me a screenshot of a profile on mastodon with a Lightning Address? I want to update the designs on getalby.com/value4value

MoritzKa avatar May 03 '22 14:05 MoritzKa

maybe we can also make a PR to officially add it to Mastodon: https://github.com/mastodon/mastodon ?

I think that would generally be preferable, since there are so many instances that you can't really have a whitelist for it.

I was thinking about this in the past, and I think the cleanest way would be to add a new Mastodon user preference for adding a Lightning Address to a user profile, which could then be fetched by any other user and software (Mastodon is just one out of many ActivityPub applications). And the user's client could then implement the payment flow via the Lightning Address and using WebLN, and whatever integration is best for native mobile apps on the various mobile operating systems.

To improve things for users even further, fediverse server providers can then also go ahead and offer sats inboxes for their local users, and pre-configure local Lightning Addresses for them (same as the normal user address). This is what we had planned to do with kosmos.social, once we have the user base there ported to our LDAP server, where we already offer Lightning accounts to all kosmos.org users.

raucao avatar May 30 '22 07:05 raucao

@bumi

re 2. we could also use custom profile metadata:

There's an existing convention for cryptocurrency donation addresses: metadata fields with labels like $BTC, $ETH etc. I've never seen anything like $LN though

silverpill avatar Jul 20 '22 18:07 silverpill

There's an existing convention for cryptocurrency donation addresses: metadata fields with labels like $BTC, $ETH etc. I've never seen anything like $LN though @silverpill ahh, good to know. should we use $BTC? or $LN?

bumi avatar Jul 20 '22 19:07 bumi

I don't know, which one do you think Alby users would prefer? It's just a convention and most fedi servers display such fields as ordinary fields. One exception is Soapbox which displays them as donation widgets. I think it will recognize both $BTC and $LN but it won't show an icon for $LN because it uses icons from cryptocurrency-icons package.

silverpill avatar Jul 20 '22 20:07 silverpill