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: tipping support for mastodon #826

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

reneaaron
Copy link
Contributor

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 reneaaron force-pushed the feature/tipping-for-mastodon branch from ebd7a0c to 790d175 Compare April 26, 2022 12:39
@reneaaron
Copy link
Contributor Author

@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? 🤔

@bumi
Copy link
Collaborator

bumi commented Apr 30, 2022

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?

"",
description:
document.querySelector(
".public-account-bio, .account__header__bio .account__header__content"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is to broad. when a user has profile metadata then this is also in the description.

@reneaaron
Copy link
Contributor Author

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. 👍

@bumi
Copy link
Collaborator

bumi commented May 1, 2022

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

@bumi
Copy link
Collaborator

bumi commented May 1, 2022

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
Copy link
Collaborator

bumi commented May 2, 2022

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

@MoritzKa
Copy link
Contributor

MoritzKa commented May 3, 2022

@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

@raucao
Copy link

raucao commented May 30, 2022

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.

import setLightningData from "../setLightningData";

const urlMatcher =
/^https:\/\/(bitcoinhackers\.org|kosmos\.social)\/(web\/)?@\S+/;

Choose a reason for hiding this comment

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

Is there no way to generalize this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

it could check the actual HTML code, but we wanted to avoid this initially.
Do you think it's OK to do that?

@silverpill
Copy link

@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

@bumi
Copy link
Collaborator

bumi commented Jul 20, 2022

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?

@silverpill
Copy link

silverpill commented Jul 20, 2022

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.

@seberm seberm mentioned this pull request Apr 9, 2023
3 tasks
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.

Tipping feature for Mastodon instances
6 participants