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

Can't announce articles from writefreely instances on litepub #4

Closed
kaniini opened this issue Nov 10, 2018 · 12 comments
Closed

Can't announce articles from writefreely instances on litepub #4

kaniini opened this issue Nov 10, 2018 · 12 comments
Milestone

Comments

@kaniini
Copy link

kaniini commented Nov 10, 2018

Announcing a post fails on litepub because the given object URI cannot be reused. This is technically a violation of both ActivityPub as well as LitePub standards.

05:35:17.818 [info] {
  "type": "Undo",
  "to": [
    "https://pleroma.site/users/kaniini/followers",
    "https://pleroma.site/users/kaniini"
  ],
  "published": "2018-11-10T05:34:53.551223Z",
  "object": {
    "type": "Announce",
    "to": [
      "https://pleroma.site/users/kaniini/followers",
      "https://blog.writefreely.org/api/collections/writefreely"
    ],
    "published": "2018-11-10T05:34:07.348041Z",
    "object": "https://blog.writefreely.org/api/posts/84rth4rg4b1ksw9x",
    "id": "https://pleroma.site/activities/6c918db7-5940-43de-93a5-4408bedfc7c8",
    "context_id": 14964830,
    "context": "https://pleroma.site/contexts/df27ab3f-9660-4f9f-ad2c-1dd51a5ca220",
    "cc": [
      "https://www.w3.org/ns/activitystreams#Public"
    ],
    "actor": "https://pleroma.site/users/kaniini"
  },
  "id": "https://pleroma.site/activities/5aea13d6-683a-4927-8cc4-8bde293a7383",
  "context_id": 14964830,
  "context": "https://pleroma.site/contexts/df27ab3f-9660-4f9f-ad2c-1dd51a5ca220",
  "cc": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "actor": "https://pleroma.site/users/kaniini",
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://litepub.github.io/litepub/context.jsonld"
  ]
}

We can prove the object is not reusable by trying to fetch it as we would any other capability URI:

raccoon:~$ curl -H 'Accept: application/json' 'https://blog.writefreely.org/api/posts/84rth4rg4b1ksw9x'
404 page not found
raccoon:~$ curl -H 'Accept: application/activity+json' 'https://blog.writefreely.org/api/posts/84rth4rg4b1ksw9x'
404 page not found
raccoon:~$ curl -H 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"' 'https://blog.writefreely.org/api/posts/84rth4rg4b1ksw9x'
404 page not found

It's a shame because I wanted to share your FOSS announcement with the world.

@thebaer
Copy link
Member

thebaer commented Nov 10, 2018

So to fix this you just need to be able to fetch posts like you're doing in those cURL requests? I think this is just a missing route on our end.

@kaniini
Copy link
Author

kaniini commented Nov 10, 2018

yeah, the object URIs need to respond with the underlying Article object. if they respond with 404 or otherwise, a litepub instance must consider the Announce as denied. Mastodon also has the same behavior.

@thebaer
Copy link
Member

thebaer commented Nov 10, 2018

Got it, thanks for the explanation. I have noticed some occasional weirdness with Announces for a while, so that might've been the issue. Just deployed the fix on blog.writefreely.org

@thebaer thebaer closed this as completed Nov 10, 2018
@thebaer
Copy link
Member

thebaer commented Nov 10, 2018

Ah, whoops. Data isn't correct.

@thebaer thebaer reopened this Nov 10, 2018
@kaniini
Copy link
Author

kaniini commented Nov 10, 2018

yeah, it seems to be returning your own internal data for the post instead of the AS2 object.

@thebaer
Copy link
Member

thebaer commented Nov 10, 2018

Alright, should all work now.

@kaniini
Copy link
Author

kaniini commented Nov 10, 2018

Seems the boost is still failing. Digging into it some more.

@kaniini
Copy link
Author

kaniini commented Nov 10, 2018

Okay. Looks like it's good on writefreely end. The failure I am seeing now is caused by failure to reflect WriteFreely articles into OStatus, but that's something we need to fix in Pleroma. Feel free to close this out.

@thebaer
Copy link
Member

thebaer commented Nov 10, 2018

Cool, will leave this closed 👍 Thanks for investigating.

@kaniini
Copy link
Author

kaniini commented Nov 10, 2018

Yep, with an OStatus reflection hotfix it all works as expected.

@kaniini
Copy link
Author

kaniini commented Nov 10, 2018

(and it looks so nice in Pleroma: https://pleroma.site/notice/8016720)

@thebaer
Copy link
Member

thebaer commented Nov 10, 2018

Awesome. Yeah, it looks really good. Love that links and text formatting show up too.

@thebaer thebaer added this to the 0.2 milestone Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants