Update getUncachedProfileData to check for an alternate version of webfinger responses#11
Update getUncachedProfileData to check for an alternate version of webfinger responses#11ChrisW-B wants to merge 1 commit into
getUncachedProfileData to check for an alternate version of webfinger responses#11Conversation
…webfinger responses - gotosocial and pleroma support formats like `https://social.chriswb.dev/.well-known/webfinger?resource=acct:@chrisw_b@social.chriswb.dev` - Mastodon does not, but does support `https://mastodon.social/.well-known/webfinger?resource=https://mastodon.social/@tvler`, which gotosocial and pleroma do not support at the moment As a result, non-mastodon rel=me tags may get missed. This tries to add a second query as another check for any rel=me tags
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
if you're free, it'd be awesome to find where this is happening in the mastodon repo! no worries if you're not familiar with ruby I can check it out this weekend |
|
Sure, I can look into it tonight or tomorrow! Looking into what mastodon is doing is a better idea than just futzing around with endpoints |
|
I mean I bet you’re not too far off with your implementation honestly lol. In the offchance there is a cleaner solution it would be worth it to find out |
|
Ok I did some poking around in the mastodon repo and all the evidence I can find for tests does seem to expect webfinger queries to come through like I'm not sure how I screwed up before that I wasn't getting a response for mastodon, but it seems like updating to use constructOpenIDUrl might work everywhere. I'm basing this mostly on reading through tests like this: https://github.com/mastodon/mastodon/blob/main/spec/services/resolve_account_service_spec.rb. I think the account resolution starts here: https://github.com/mastodon/mastodon/blob/main/app/services/resolve_account_service.rb#L18, which seems to be splitting the url into a domain and username and then using |
|
so cool thanks! you know I'm actually in the dev discord so maybe I'll ask there. this seems like the right path |
|
Oh perfect, that sounds good! |
|
looks like this is related too. will do more research later https://github.com/mastodon/mastodon/blob/main/app/services/activitypub/fetch_remote_actor_service.rb |
|
this'll be in the next release. needed to work on cache invalidation for "notProfile" links first so that "notProfile" links which would now return "profile" would show up in people's StreetPass list https://mastodon.social/@tvler/110129790506615727 |
|
awesome! looking forward to it |
|
Alright here's my rough plan for what I think we need to do to achieve this https://mastodon.social/@tvler/110146976011936688
Luckily this eng work aligns with this other feature on the roadmap to display more social information in the StreetPass popup UI (https://mastodon.social/@tvler/110135445576666001), so I'm down to move forward w this approach! Need to query activitypub to get all this information anyways |
|
The API directory that hosts streetpass.social is just a simple next.js app for now https://github.com/tvler/streetpass/tree/main/api I'm gonna see how feasible it is to keep this and use next's APIs and caching for all the activitypub queries |

Hey, I recently switched to gotosocial and noticed that StreetPass was no longer working, so I did some digging.
From checking around between gotosocial, Pleroma, and Mastodon.
https://social.chriswb.dev/.well-known/webfinger?resource=acct:@chrisw_b@social.chriswb.dev. This seems to fit section 3.1 of the Webfinger spec, so I think it's intentional behavior.https://mastodon.social/.well-known/webfinger?resource=https://mastodon.social/@tvler, which gotosocial and pleroma do not support at the momentAs a result, non-mastodon rel=me tags may get missed. This tries to add a second query as another check for any rel=me tags.
If your intention is only to support Mastodon, I completely understand why, I could absolutely see broadening to random implementations of rel=me and webfinger causing lots of problems. If you do want to use this though, let me know if there are any changes for error handling or formatting I need to make!
Thanks for the great extension!