URL to original post is not correctly federated to Misskey
Describe the bug When an image-post is created in Mbin and then viewed on a Misskey instance, the post will link to the image-file, not the post on the Mbin instance.
On which Mbin instance did you find the bug? fedia.io
Which Mbin version was running on the instance? 1.8.0
To Reproduce Steps to reproduce the behavior:
- create a new image entry in a federated magazine (e.g.
https://fedia.io/m/[email protected]/new/photo) - view the post on a Misskey (or derivate) instance (example).
- expand the full post (もっと見る)
-> The media is embedded correctly, but the link at the bottom only points to the image, not the post itself.
Expected behavior An example for correct behavior can be seen here. The link-panel at the bottom of the post will link to the Lemmy-post.
Desktop (please complete the following information):
- OS: Linux (Fedora)
- Browser: Librewolf
- Browser Version: 135.0.1-1
Smartphone (please complete the following information): not tested
Additional context I am not sure if the issue is in Mbin or Misskey. If you think the second option is the case, I will create an issue at Misskeys repo.
Yeah I gotta say that the issue is a misskey one to be honest. Have you checked how a lemmy post looks on misskey?
Yes, please open the link at Expected behavior.
I also checked on Mastodon and there is the same problem.
You can check by searching me, open my profile and scroll down to the Linux Memes post (can't link to it directly as Mastodon would initiate a redirect to the media-url). The three-dots-menu has an option to open the original post, which just links to the image, not the Fedia page.
And is this working with a link post? Or is the "wrong" behaviour on Misskey or Mastodon as well?
We use the url field of an ActivityPub json for the link and if it is an image post the url contains a link to the image. Lemmy uses this field in the same manner, so I am curious whether their posts work better in that regard.
Link-Posts from Mbin also don't get a link to the original post (in neither Misskey nor Mastodon) and as it seems won't even have an image-preview.
I don't know what Lemmy is doing differently, and I don't have a Lemmy Account, so I can't really run tests.
After checking the object lemmy produces, it is relatively simple to fix. We currently use the url field which mastodon uses as a "here is the page to view the post". Lemmy does not do it this way, but instead puts it in the attachement field like this:
{
"type": "Page",
"id": "https://mbin.tld/...",
"attachment": [
{
"href": "https://site.tld/link",
"mediaType": "text/html; charset=utf-8",
"type": "Link"
}
],
"..."
}
Which we can parse already, I was actually not aware of this.
Interesting to know.
This makes me wonder what the "right" (as in "intended by the ActivityPub Specs") design is? Was the Lemmy way according to spec or did they do their own thing and others adjusted?
If it is second, should we ask them to comply with spec or just go with the flow?
(Not that I have a saying in this, but it is kinda interesting to think about Fedi governance.)
I am always on the side of "going with the flow" when it comes to AP as the spec is so loose. However, the spec says this:
Identifies one or more links to representations of the object
So I think we are off spec here...