anze3db / fedidevs

Discover amazing developers across the fediverse 🌐
https://fedidevs.com
MIT License
22 stars 6 forks source link

Open links in home instance when logged in #47

Closed levlaz closed 3 months ago

levlaz commented 3 months ago

I am so happy that you can follow accounts directly now, but in a similar vein, when looking at a post from a conference I wish you could either interact with it directly, or at the very least open up the link in your home instance so that you can interact with it, instead of having to go through the whole "take me home dance" once you end up at the remote instance.

So for example, my home is hachyderm.io when looking at this post https://fedidevs.com/madisonruby24/

It would be amazing if clicking on it took me here:

https://hachyderm.io/@MadisonRuby@ruby.social/111921359517971053

instead of here:

https://ruby.social/@MadisonRuby/111921359434289513

anze3db commented 3 months ago

Awesome idea! I was already planning to do some larger conference page improvements, but this one feels very easy to implement. No promises, but I'll try to get this in tonight! Thank you for the suggestion!

anze3db commented 3 months ago

@levlaz I won't be able to finish up this today. I'm currently dealing with is that the post ids aren't the same. 111921359517971053 vs 111921359434289513 so I have to somehow translate from source instance post id to your instance post id and I haven't figured out how to do that yet. Any ideas?

On the flip side I did deploy a fix for the account links so at least those will now take you to your instance when you are logged in!

anze3db commented 3 months ago

Hey @levlaz, I made the post links redirect to your home instance!

Once caveat: You'll have to log out and then log in before it will work for you. This is because the solution required an additional oauth scope (read:search). I'll implement dynamically requesting scopes in the future, but for now I've changed the login flow to also request read:search. That's why logging in again is needed.

https://github.com/anze3db/fedidevs/commit/d5b8c0d61c6cef8e23b2ad2e66254a041107c9ad

levlaz commented 3 months ago

Thank you so much @anze3db this is fantastic and works like a charm!