Closed snan closed 9 months ago
That worked fine, but the outbox address doesn't seem to work:
This API is not implemented (yet?).
Saving of historical data (so you can fetch all posts by a newly-followed user) increases complexity and storage requirements. In addition, your instance should contain this post if you follow the author, because this post is sent to your instance.
(I know, this means you can reply to a post from a tootik instance only if you follow the author, or any other user on the same instance follows the author, otherwise you can't access the post)
I'll see what I can do, it shouldn't be hard to save the Create activity when a new post is created, then implement an /outbox API that lists Create activities by user x.
@snan Please try now, I implemented basic support for this (no idea how to test compatibility, because I don't know what triggers requests to /outbox/%s in Mastodon)
You can try
wget --header 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"' -qO- https://hd.206267.xyz/view/77572017c3e3303677a7a1430179c23a452d25c91dc5b11b5ce602f531a0e229
to test. I still got nothing
I only implemented /outbox/%s so far, not direct access to posts.
You li'l scoundrel ♥ Yeah, outbox works fine now
@snan Try now, you should be able to fetch posts over HTTPS - the ID of a post is now a working HTTPS URL and not just an opaque identifier
$ curl -s https://hd.206267.xyz/outbox/dimkr | jq -r .first
https://hd.206267.xyz/outbox/dimkr?01694268286
(first page of dimkr's outbox)
$ curl -s https://hd.206267.xyz/outbox/dimkr?01694268286 | jq -r '.orderedItems[0].object.id'
https://hd.206267.xyz/post/8189787ffae14a8bfd03bb2fbb21045adb98265de8784e1f2c910b68ea9d8129
(object ID of first activity in dimkr's outbox, assuming it's a Create activity of a Note object)
$ curl -s https://hd.206267.xyz/post/8189787ffae14a8bfd03bb2fbb21045adb98265de8784e1f2c910b68ea9d8129 | jq
{
"@context": "https://www.w3.org/ns/activitystreams",
"attributedTo": "https://hd.206267.xyz/user/dimkr",
"cc": [
"https://hd.206267.xyz/followers/dimkr"
],
"content": "Test public post after big refactor",
"id": "https://hd.206267.xyz/post/8189787ffae14a8bfd03bb2fbb21045adb98265de8784e1f2c910b68ea9d8129",
"published": "2023-09-09T14:04:46.602422143Z",
"tag": null,
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note",
"url": "gemini://hd.206267.xyz/view/83708f1c8cc781380460991578904f5b8dbec95f997490d7a9e160f89c5b3f27"
}
(the Note object associated with this ID)
More improvements (still not pushed but already deployed in hd.206267.xyz):
I still haven't been able to pull them into Akkoma, even after all this hard work that you've put in so far.
It works now!
Hi!
I wanted to reply to this post gemini://hd.206267.xyz/view/77572017c3e3303677a7a1430179c23a452d25c91dc5b11b5ce602f531a0e229 from my Akkoma instance but I didn't know what to search for in there.
wget --header 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"' -qO- "htt ps://hd.206267.xyz/user/dimkr"|jq|less
That worked fine, but the outbox address doesn't seem to work:
wget --header 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"' -qO- https://hd.206267.xyz/outbox/dimkr|less
Nor can I do this:
wget --header 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"' -qO- https://hd.206267.xyz/view/77572017c3e3303677a7a1430179c23a452d25c91dc5b11b5ce602f531a0e229 I tried grepping through Tootik's golang source code for hints, too. Tootik is such a good idea. Thank you for starting this project.