snarfed / bridgy-fed

🌉 A bridge between decentralized social network protocols
https://fed.brid.gy
Creative Commons Zero v1.0 Universal
726 stars 39 forks source link

URL for a bluesky account bridged to the fediverse #1529

Open frzysk opened 1 day ago

frzysk commented 1 day ago

hi hello

This is mostly a proposal made as a pull request because I don't know the source code of bridgy-fed or the protocols much, and because I couldn't make a Cloud SDK account to modify and run the tests sowwy. So there's probably things to change.

I've seen that for the message @blueskyuser@bsky.brid.gy is already bridged into the fediverse. (that I received on fedi about a bluesky profile), the user wasn't a link. That made me sad so I tried to modify that.

I added ActivityPub.bridged_web_url_for() that works for any BlueSky account and returns a url like https://bsky.brid.gy/r/https://bsky.app/profile/blueskyuser.bsky.social. That's the type of url I get if I post something mentioning a bsky.brid.gy account from the fediverse.

The code I added is way smaller than this description

thanks :))

Tamschi commented 21 hours ago

It's a bit tricky because of how Mastodon handles user mentions that actually open in the UI. See https://github.com/snarfed/bridgy-fed/issues/887#issuecomment-2460870494 for technical details.

In theory it's feasible though. Since Bridgy Fed would be the target 'instance' of the mention here, it could filter out these messages somewhat easily in cases where they would have any effect when received by the bridge. It's probably somewhat involved though.

snarfed commented 8 hours ago

Thanks for the contribution @frzysk!

@Tamschi is right, the goal here is to link to the bridged account, not the original account, so we'd want to link these addresses so that they open the bridged fediverse profile in the local instance, a la #887.

That's proved pretty difficult so far. We have a lead on how to do it though, described at the bottom of that issue. Feel free to try!

(Btw you shouldn't need a Google account, or any other account, to download and install the Google Cloud SDK so that you can run tests.)