johnHackworth / goblin

GNU Affero General Public License v3.0
50 stars 4 forks source link

Fix fediverse user links to point at local copy of profile #66

Open sirilyan opened 7 months ago

sirilyan commented 7 months ago

https://kobold.page/notes/9rz3bq40wvu214dj

Right now those links point at the remote servers where the users are located, which means trying to follow them requires the Mastodon-style copy and search dance. We already know these links are fediverse users, but we're not formatting the links that way:

https://github.com/johnHackworth/goblin/blob/fdf0547cb6288cbc92a2f01c66b2751a25b4c441/packages/backend/src/mfm/to-html.ts#L114

Maybe something would break if we went straight to the local link (line 126)?

To be clear: the links in this post to karawynn's and longboard's profiles have class="u-url mention" on them, so we should be able to tell that they're fediverse users and rewrite these URLs to point at our-server.example/@user@remote-host, right?