LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.27k stars 885 forks source link

Resolve links to remote posts into local URL #5057

Closed Nutomic closed 1 month ago

Nutomic commented 1 month ago

Checks markdown text for links like [/c/ich_iel](https://feddit.org/c/ich_iel), resolves them via Activitypub and rewrites to a local link like [/c/ich_iel](https://lemmy.ml/c/ich_iel@feddit.org). Due to the way our code is structured this can only be done for content received via federation, not from api calls. So users should always link objects using the local instance url.

Nutomic commented 1 month ago

Added api test, although the same functionality is really already being tested in Rust.