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

Links to Mastodon accounts on servers with different LOCAL_DOMAINs and WEB_DOMAINs don't work #1677

Open
PatchMixolydic opened this issue Nov 14, 2024 · 2 comments
Labels

Comments

@PatchMixolydic
Copy link

PatchMixolydic commented Nov 14, 2024

Describe the bug
When clicking on a Mastodon link in a user's profile, it will always go to https://$LOCAL_DOMAIN/@$USERNAME, even if WEB_DOMAIN is different.

See Mastodon's setup guide for more information about LOCAL_DOMAIN and WEB_DOMAIN

To Reproduce
Steps to reproduce the behavior:

  1. Set up (or find) a Mastodon server on a subdomain, with LOCAL_DOMAIN as the domain name and WEB_DOMAIN as the subdomain. For instance, set LOCAL_DOMAIN to example.com and WEB_DOMAIN to social.example.com
  2. Create an account on the Mastodon server
  3. Link your new Mastodon account to your itch.io account
  4. Go to your itch.io profile and click on the Mastodon link
  5. Notice that you went to https://example.com/@username, not https://social.example.com/@username

Alternatively, just to confirm that this happens:

  1. Go to https://social.patchmixolydic.com/@patchmixolydic
  2. Confirm that my Mastodon account is @[email protected]
  3. Go to https://patchmixolydic.itch.io
  4. Note that the linked Mastodon account is also @[email protected]
  5. Click the link to my Mastodon account
  6. Notice that you went to https://patchmixolydic.com/@patchmixolydic instead of the URL in step 1

Expected behavior
I expected itch.io to use the same method as Mastodon to discover the correct URL.

Screenshots
My Mastodon handle is @patchmixolydic@patchmixolydic.com

The Mastodon link on my itch.io profile

I was directed to patchmixolydic.com instead of social.patchmixolydic.com

Desktop (please complete the following information):

  • OS: Arch Linux (kernel ver. 6.11.5-arch1-1)
  • Browser: LibreWolf (Firefox fork)
  • Version: 131.0.3-1
@dos1
Copy link

dos1 commented Nov 15, 2024

Rewriting the handle to profile URL should be done using a WebFinger lookup: https://webfinger.net/lookup/?resource=patchmixolydic%40patchmixolydic.com

This would not only fix handling Mastodon instances with separate handle domains, but also make it work with other ActivityPub implementations than Mastodon.

@leafo
Copy link
Member

leafo commented Nov 16, 2024

Unfortunately at this time we don't have plans to have our server making HTTP requests to random other people's servers, so if the current implementation doesn't fit your needs then I recommend moving your social link into the body of your profile where you can control the href directly.

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

No branches or pull requests

3 participants