Skip to content

fix(settings): change Mastodon only URI to webfinger #53109

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TechnicalSuwako
Copy link

@TechnicalSuwako TechnicalSuwako commented May 25, 2025

Summary

The URI for Mastodon only has been changed to the URI used for all Fediverse servers.
https://{$instance}/api/v1/accounts/lookup?acct={$username}@{$instance}https://{$instance}.well-known/webfinger?resource=acct:{$username}@{$instance}

TODO

  • ...

Checklist

@TechnicalSuwako TechnicalSuwako requested a review from a team as a code owner May 25, 2025 13:18
@TechnicalSuwako TechnicalSuwako requested review from ArtificialOwl, nfebe and yemkareems and removed request for a team May 25, 2025 13:18
@joshtrichards joshtrichards added bug 3. to review Waiting for reviews feature: profile PRs or issues related to the Profile feature (e.g. Profile page, API, etc.) labels May 25, 2025
@joshtrichards
Copy link
Member

Thanks @TechnicalSuwako. This change does seem to make sense.

Can you adjust the commit message to be in conventional format?

Refs:

https://swicg.github.io/activitypub-webfinger/
https://docs.joinmastodon.org/spec/webfinger/

@TechnicalSuwako
Copy link
Author

@joshtrichards What does the "traditional format" look like?
I use an automatic translation machine...

Signed-off-by: 諏訪子 <suwako@076.moe>
@TechnicalSuwako TechnicalSuwako changed the title The URI for Mastodon only has been changed to the URI used for all Fediverse servers. fix(settings): change Mastodon only URI to webfinger May 25, 2025
@joshtrichards joshtrichards linked an issue May 25, 2025 that may be closed by this pull request
8 tasks
@TechnicalSuwako TechnicalSuwako requested a review from susnux May 26, 2025 13:58
Signed-off-by: 諏訪子 <suwako@076.moe>
@susnux
Copy link
Contributor

susnux commented May 27, 2025

Code looks good, thank you.
But please fix the tests

There were 2 errors:

  1. Test\Accounts\AccountManagerTest::testSanitizingFediverseServer with data set "valid response" ('@foo@example.com', 'foo@example.com', true, '{"username":"foo"}')
    InvalidArgumentException: fediverse

/home/runner/actions-runner/_work/server/server/lib/private/Accounts/AccountManager.php:767
/home/runner/actions-runner/_work/server/server/lib/private/Accounts/AccountManager.php:810
/home/runner/actions-runner/_work/server/server/tests/lib/Accounts/AccountManagerTest.php:877

  1. Test\Accounts\AccountManagerTest::testSanitizingFediverseServer with data set "valid response - no at" ('foo@example.com', 'foo@example.com', true, '{"username":"foo"}')
    InvalidArgumentException: fediverse

/home/runner/actions-runner/_work/server/server/lib/private/Accounts/AccountManager.php:767
/home/runner/actions-runner/_work/server/server/lib/private/Accounts/AccountManager.php:810
/home/runner/actions-runner/_work/server/server/tests/lib/Accounts/AccountManagerTest.php:877

Signed-off-by: 諏訪子 <suwako@076.moe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug feature: profile PRs or issues related to the Profile feature (e.g. Profile page, API, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: "Faith could not update fediverse (e.g. mastodon)" [Bug]: Rejection of valid fediverse handles in user profile
3 participants