Conversation
fb9888c to
de1235b
Compare
There was a problem hiding this comment.
This is really thorough! Just two areas where I'm unsure:
- Did you intentionally remove paging from the Outbox? It looks like now the Outbox only shows the first page of results. This is acceptable according to the spec, just double-checking.
- If I'm reading this right, the fragment identifier
#createdoesn't match the spec — the Create ID needs to either be publicly dereferencable ornull. I suppose we could donullin this case, if we expect it to be basically a transient wrapper around the Note. That prevents other servers from attempting to dereference it and getting an unexpected value.
Still trying to get my VM up and running again so I can see this API actually running.
Yes, since nothing is gonna use the outbox at first I opted not to introduce that yet.
|
|
Re: Outbox, sounds good. Re: |
|
@evanminto I talked to chris about this earlier, and I think the understanding we came to is that using fragments does count as publicly dereferenceable, because you can make the request and then use the object it returns. (using an algorithm to select the correct fragment identifier—json-ld is somewhat unclear on this, so we were considering including a guideline in activitypub on how to dereference fragment identifiers) |
|
I have addressed the concern by turning the create URI to "/create" instead of "#create" I have also added representation of hashtags and mentions, although hashtag representation is incomplete (spec is unclear). Also, sensitivity of the content still cannot be encoded in AP. |
|
For the record—I think that
and the original issue discussion: |
|
@nightpool I had a later conversation with Chris about this as well. The problem is that "create" is above the "note" in hierarchy, so it wouldn't work that way - there is no reason for note JSON to return the create activity. |
|
Another option is something like {
"id": "https://mastodon.social/users/Gargron/updates/3243062",
"type": "Create",
"object": {
"type": "Note",
"id": null
}
}which is also supported by the spec (the two objects share the same identifier) |
|
@Gargron This is why I think it needs to be hashed out a little more in the spec itself, but I would say the algorithm would be something like:
this would work in both cases? |
evanminto
left a comment
There was a problem hiding this comment.
I like the new /create route for Create activities, but I still think the activities should be accessible at that URL. Right now the id doesn't point to a real resource. Not sure if you were planning on adding that.
That's my only concern.
1e06e53 to
c728ab7
Compare
|
@evanminto Okay, I rewrote all this stuff with serializers, which I think is a lot cleaner now. However, the difference between Create/Announce and Note is really blurry still. For example! A local status can be a reblog, aka a wrapper around another status. So what to do when its URI is directly accessed? It's technically among the notes URIs, but it would need to be an Announce (or web redirect to URI of original?) It is the most frustrating thing. I suggest we leave this as-is and then adjust in future PRs. I would also like to involve @cwebber in writing down an audience matrix for all of our visibility levels. There's cc, to, bcc, bto; and there's public, unlisted, followers+mentions-only and mentions-only (direct), and I have no good idea which values to fill in where. |
… for better URL/URI generation
…ally (Because for remote ones we may not know for sure) Add mentions and hashtags representation to AP notes
b04a341 to
7f3144e
Compare
|
The activity/object thing has been resolved. |
The difference between
Public post should be like: (again, you can swap out to/cc as you wish, it barely matters, just my suggestion) Followers-Only vs Unlisted? I'm not sure what the difference is, it seems to me that they're the same: I guess the difference is that one of them really is public but just doesn't get inserted in the Public timeline? I'm not sure how to differentiate these though. followers+mentions-only: mentions-only: Again, you have a lot of freedom on where to put to/cc. |
|
@cwebber Implemented. @evanminto Pls re-review. |
|
My two cents on the ActivityPub side: It seems the outbox has no .. however, the announces use a local |
@puckipedia Please explain. It would return the object with a remote URI and all of its remote data as we know it, so it should be fine - the most important part being the ID. So what's wrong? |
|
I tested it out with a local server, and searched for https://mastodon.social/users/Gargron/updates/1 and then boosted it - this results in a proper status being loaded in the database, but the activitypub representation shows the actor being my instance's I am pretty sure this is because the object it's serializing is actually the boost, and, not the original status that was boosted. ( |
|
@puckipedia mastodon.social isn't running this PR! it's running 1.4.7. there is no live instance which uses this PR since it's not merged |
|
Okay, I found a more simple way: if I post a status on the admin account (which gets the url While checking that, I realised I think it's best to add the audience (so |
…s and not the wrapper status, add "id" to all collections
|
@puckipedia Fixed! |
|
Yay, that works! Kroeg now seems to have no issue loading the ActivityPub data! |
evanminto
left a comment
There was a problem hiding this comment.
Nothing jumps out at me, so it looks good to me. I really like the serializers for the JSON-LD!
Note representation:
Close #3438
Close #3439
Close #3458