matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.13k forks source link

Implement link previews for web+* URIs using fedilinks fallback protocol handlers #16542

Open SoniEx2 opened 1 year ago

SoniEx2 commented 1 year ago

Fallback protocol handlers, as defined here: https://fedilinks.org/2 should be used to provide link previews for web+* URIs.

This would help promote web+* URIs, which are a limited form of composable URIs designed for compatibility with existing computer systems. Because we believe links should be able to work on a best-effort basis, with fallbacks to other protocols as needed. This would help with protocol proliferation. "Protocols, not platforms."

clokep commented 1 year ago

Providing an example link is usually helpful with this sort of thing.

SoniEx2 commented 1 year ago

real world implementation

link: <web+ap://portend.place/users/smitten> (filtered by github)

fallback handler: https://portend.place/.well-known/protocol-handler?target=web%2Bap://portend.place/users/smitten (this is what would be used for the preview)

clokep commented 1 year ago

FTR the fallback handler is just a 302 redirect to location: /api/v1/akkoma/protocol-handler?target=web%2Bap%3A%2F%2Fportend.place%2Fusers%2Fsmitten

SoniEx2 commented 1 year ago

yes, usually there are 2 redirects involved. here's another another one:

link: <web+ap://is-a.cat/users/ar>

fallback handler: https://is-a.cat/.well-known/protocol-handler?target=web%2Bap://is-a.cat/users/ar

SoniEx2 commented 1 year ago

since this would be a 2-line patch, do you think you (matrix) can first get rid of your real name policy, just as Linux has done?

clokep commented 1 year ago

since this would be a 2-line patch

I suspect we'd like to see a bit more uptake in the ecosystem before supporting this.

do you think you (matrix) can first get rid of your real name policy, just as Linux has done?

You can sign-off privately if you would prefer: https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#private-sign-off

reivilibre commented 11 months ago

since this would be a 2-line patch, do you think you (matrix) can first get rid of your real name policy, just as Linux has done?

we also accept common law names (names claimed by legitimate usage or repute), see https://matrix-org.github.io/synapse/latest/development/contributing_guide.html?highlight=common%20law#sign-off.