planetary-social / ansible-scripts

Ansible automation scripts used at Planetary
MIT License
2 stars 3 forks source link

Nginx config for /follow/feedId route #19

Closed chereseeriepa closed 10 months ago

chereseeriepa commented 1 year ago

I added a new route to the Vue router /follow/{feedId} which behaves similar to the /profile/{feedId} route, except it redirects it to an external ssb-uri.

So I think this just needs to add a / to the route. This was a quick fix I did yesterday to reduce the complexity of the QR code you can scan to follow someone. Temporary until Planetary supports more ssb-uri types

cooldracula commented 1 year ago

@chereseeriepa , I was working on this this evening, but realized I wasn't quite sure what success should look like. I added the route to the nginx config on my test server(ansible.fun) using the same logic as /profile/@feedid

at the moment the profile links should load successfully: https://ansible.fun/profile/@nWjamqvbDIMIgZQchHCZPnROk0jUvjCO7oLLKdHgbJs=.ed25519

the follow link, for me, redirects to the frontend homepage. This is telling me that nginx is sending the traffic to the frontend successfully, but i am not sure what it should do from there:

https://ansible.fun/follow/@nWjamqvbDIMIgZQchHCZPnROk0jUvjCO7oLLKdHgbJs=.ed25519

(for comparison, the planetary.pro config has not been updated, so follow routes redirect to the room-frontend, as it's the catchall for any unknown routes: https://planetary.pro/follow/@UsApPEhMpZaoRzoT6PfWcBct5vOaHXntpndwAbTw3po=.ed25519)

What should I expect to see when I go to a /follow/@feedid route?

Thank you!

chereseeriepa commented 1 year ago

@zachmandeville what the follow route should do is defined here: https://github.com/planetary-social/rooms-frontend/blob/main/src/router/index.js

It should:

  1. Go to that follow route
    /follow/@xuw3I0S9frG8selUqbPx712E7QM8LwX5rFpRIzgHqx4=.ed25519
  2. Load the profile using that feedId and the profile should contain an ssbURI that looks like:
    ssb:experimental?action=consume-alias&roomId=%40HGwGdPc0R8HG%2Bik9%2BCOgldeMq78sQ9O5adH9qlcNqBo%3D.ed25519&userId=%40xuw3I0S9frG8selUqbPx712E7QM8LwX5rFpRIzgHqx4%3D.ed25519&multiserverAddress=net%3Alocalhost%3A8008%7Eshs%3AHGwGdPc0R8HG%2Bik9%2BCOgldeMq78sQ9O5adH9qlcNqBo%3D
  3. Vue router will set the page to that ssbURI, which should prompt the planetary app to open
mplorentz commented 1 year ago

@martindsq can you verify that this type of link works in the Planetary app?

cooldracula commented 10 months ago

As this project is shelved, i am going to close this ticket.