Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Johann150 opened this issue Jan 29, 2023 · 1 comment
Closed

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

Johann150 opened this issue Jan 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Johann150
Copy link

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
{
    "@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": "<p>cross-posted from:  https://lemmy.ml/post/131681</p>\n<blockquote>\n<p>So I spend little more than half an hour and just <a href=\"https://mastodon.social/@humanetech/107524097498259641\">tooted an image</a> I created with some of the hashtags we brainstormed at <a href=\"https://fediverse.town/t/lets-start-the-fedivolution2022/266\">Fediverse Town</a>. This version is higher-res, licensed CC0.</p>\n<p><!-- raw HTML omitted -->_(Created in <a href=\"https://inkscape.org/\">Inkscape</a> using <a href=\"https://svgsilh.com/image/23547.html\">this CC0 vector image</a>. <strong>#FediVolution</strong> hashtag credit <a href=\"https://climatejustice.social/@PaulaToThePeople\">@PaulaToThePeople</a>, <strong>#FediverseRising</strong> by me.)_<!-- raw HTML omitted --></p>\n<p><img src=\"https://lemmy.ml/pictrs/image/9cdd1d83-9e13-4da3-903c-01e7471ff12f.png\" alt=\"#FediverseRising2022, Join the #Fedivolution, Be You, Be Free, Be Alive\" /></p>\n<p><img src=\"https://lemmy.ml/pictrs/image/c2ed02e0-0126-450e-ab74-3ee654913fa2.png\" alt=\"#FediverseRising2022, Join the #Fedivolution, Be You, Be Free, Be Alive (Rainbow version)\" /></p>\n</blockquote>\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> <small>_(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.)_</small>\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 friendica/friendica#12753

@Johann150 Johann150 added the bug Something isn't working label Jan 29, 2023
@Nutomic
Copy link
Member

Nutomic commented Jan 30, 2023

This field will be removed in 0.17: #2182

@Nutomic Nutomic closed this as completed Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants