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

URL to original post is not correctly federated to Misskey #1484

Open
blued-gear opened this issue Mar 1, 2025 · 8 comments
Open

URL to original post is not correctly federated to Misskey #1484

blued-gear opened this issue Mar 1, 2025 · 8 comments
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests bug Something isn't working

Comments

@blued-gear
Copy link

blued-gear commented Mar 1, 2025

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/linuxmemes@lemmy.world/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 blued-gear added the bug Something isn't working label Mar 1, 2025
@BentiGorlich BentiGorlich added needs feedback Requires a greater consensus to make an informed decision activitypub ActivityPub related issues and removed bug Something isn't working labels Mar 3, 2025
@BentiGorlich
Copy link
Member

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

@blued-gear
Copy link
Author

Yes, please open the link at Expected behavior.

@blued-gear
Copy link
Author

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.

@BentiGorlich
Copy link
Member

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.

@blued-gear
Copy link
Author

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.

@BentiGorlich BentiGorlich added bug Something isn't working backend Backend related issues and pull requests and removed needs feedback Requires a greater consensus to make an informed decision labels Mar 4, 2025
@BentiGorlich
Copy link
Member

BentiGorlich commented Mar 4, 2025

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.

@blued-gear
Copy link
Author

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

@BentiGorlich
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants