mbin icon indicating copy to clipboard operation
mbin copied to clipboard

URL to original post is not correctly federated to Misskey

Open blued-gear opened this issue 10 months ago • 8 comments

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:

  1. create a new image entry in a federated magazine (e.g. https://fedia.io/m/[email protected]/new/photo)
  2. view the post on a Misskey (or derivate) instance (example).
  3. 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.

blued-gear avatar Mar 01 '25 00:03 blued-gear

Yeah I gotta say that the issue is a misskey one to be honest. Have you checked how a lemmy post looks on misskey?

BentiGorlich avatar Mar 03 '25 14:03 BentiGorlich

Yes, please open the link at Expected behavior.

blued-gear avatar Mar 03 '25 17:03 blued-gear

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.

blued-gear avatar Mar 03 '25 18:03 blued-gear

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.

BentiGorlich avatar Mar 04 '25 07:03 BentiGorlich

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.

blued-gear avatar Mar 04 '25 09:03 blued-gear

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.

BentiGorlich avatar Mar 04 '25 13:03 BentiGorlich

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.)

blued-gear avatar Mar 04 '25 14:03 blued-gear

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...

BentiGorlich avatar Mar 04 '25 15:03 BentiGorlich