LemmyNet / lemmy

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

federation: incorrect use of the `ap:url` field #2676

Closed Johann150 closed 1 year ago

Johann150 commented 1 year ago

Issue Summary

The https://www.w3.org/ns/activitystreams#url (aka ap:url) property in the ActivityPub representation of Pages seems to be used against its defined semantics. From its definition:

Identifies one or more links to representations of the object. -- https://www.w3.org/TR/activitystreams-vocabulary/#dfn-url (emphasis mine)

I understand this to mean that the xsd:anyURI that is contained in ap:url field should lead to a representation of the object itself (i.e. the Note), not something it is quoting or talking about. This is because the Lemmy Page talking about something is not the same as that thing.

The ap:url field should lead to a "human readable" representation of the object, e.g. the friendica frontend. This is also how Mastodon, Pleroma and Misskey use this field.

Steps to Reproduce

curl -sH 'accept: application/activity+json' 'https://lemmy.ml/post/131686' | python -m json.tool

view full JSON example ```json { "@context": [ "https://www.w3.org/ns/activitystreams", { "stickied": "as:stickied", "pt": "https://join-lemmy.org#", "sc": "http://schema.org#", "matrixUserId": { "type": "sc:Text", "id": "as:alsoKnownAs" }, "sensitive": "as:sensitive", "comments_enabled": { "type": "sc:Boolean", "id": "pt:commentsEnabled" }, "moderators": "as:moderators" }, "https://w3id.org/security/v1" ], "type": "Page", "id": "https://lemmy.ml/post/131686", "attributedTo": "https://lemmy.ml/u/humanetech", "to": [ "https://lemmy.ml/c/fediversefutures", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Join the #FediVolution .. The Year of #FediverseRising2022 Is Upon Us", "cc": [], "content": "

cross-posted from: https://lemmy.ml/post/131681

\n
\n

So I spend little more than half an hour and just tooted an image I created with some of the hashtags we brainstormed at Fediverse Town. This version is higher-res, licensed CC0.

\n

_(Created in Inkscape using this CC0 vector image. #FediVolution hashtag credit @PaulaToThePeople, #FediverseRising by me.)_

\n

\"#FediverseRising2022,

\n

\"#FediverseRising2022,

\n
\n", "mediaType": "text/html", "source": { "content": "cross-posted from: https://lemmy.ml/post/131681\n\n> So I spend little more than half an hour and just [tooted an image](https://mastodon.social/@humanetech/107524097498259641) I created with some of the hashtags we brainstormed at [Fediverse Town](https://fediverse.town/t/lets-start-the-fedivolution2022/266). This version is higher-res, licensed CC0.\n> \n> _(Created in [Inkscape](https://inkscape.org/) using [this CC0 vector image](https://svgsilh.com/image/23547.html). **#FediVolution** hashtag credit [@PaulaToThePeople](https://climatejustice.social/@PaulaToThePeople), **#FediverseRising** by me.)_\n> \n> ![#FediverseRising2022, Join the #Fedivolution, Be You, Be Free, Be Alive](https://lemmy.ml/pictrs/image/9cdd1d83-9e13-4da3-903c-01e7471ff12f.png)\n>\n>![#FediverseRising2022, Join the #Fedivolution, Be You, Be Free, Be Alive (Rainbow version)](https://lemmy.ml/pictrs/image/c2ed02e0-0126-450e-ab74-3ee654913fa2.png)", "mediaType": "text/markdown" }, "url": "https://mastodon.social/@humanetech/107524097498259641", "attachment": [ { "href": "https://mastodon.social/@humanetech/107524097498259641", "type": "Link" } ], "image": { "type": "Image", "url": "https://lemmy.ml/pictrs/image/5b9fc694-8262-4ab8-9607-9cb003bb5ab3.png" }, "commentsEnabled": true, "sensitive": false, "stickied": false, "published": "2021-12-28T10:53:15.871394+00:00", "updated": "2021-12-28T11:39:58.548261+00:00" } ```

see also https://akkoma.dev/FoundKeyGang/FoundKey/issues/331#issuecomment-7146 and https://github.com/friendica/friendica/issues/12753

Nutomic commented 1 year ago

This field will be removed in 0.17: https://github.com/LemmyNet/lemmy/pull/2182