Repository navigation
Like object embedding - #322
Merged
Merged
Conversation
aaronjae22
added this pull request to stack #321
October 5, 2026 20:46
aaronjae22
marked this pull request as ready for review
October 5, 2026 20:46
lisad
approved these changes
Oct 6, 2026
aaronjae22
force-pushed
the
like-object-embedding
branch
from
October 9, 2026 16:07
674290e to
727e69c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A few things left to solve on the like object and its collection.
The outbox decides what an anonymous caller sees from the Like's visibility, not the Note's. So a public Like of someone else's private Note hands that Note to anyone who asks.
Tihs is an example. Bob writes a private Note, Alice likes it publicly. This is Alice's outbox providing Bob's private Note, fetched with no token:
{ "type": "Note", "id": "<http://testserver/api/notes/1/>", "attributedTo": "<http://testserver/api/actors/2/>", "content": "BOB PRIVATE", "visibility": "private", "summary": "CW: a copied note", "to": ["<https://lemongrove.example/followers>"], "cc": ["<https://oakfrost.example/brock>"], "inReplyTo": "<https://lemongrove.example/notes/parent>", "url": "<https://lemongrove.example/@aurora/1>", "source": { "content": "copied", "mediaType": "text/markdown" }, "previously": [ { "actor": "<https://lemongrove.example/>", "id": "<https://lemongrove.example/notes/1>" } ] }Bob's own outbox correctly hides this Note. Alice's publishes all of it (the content, who it was sent to, its original markup and its history). The liked collection does the same for Alice's token.
This breaks LOLA §5's MUST that a grant reaches only its own account.
This is Alice's liked collection currently:
{ "id": "<http://testserver/api/notes/1/>", "type": "Note", "attributedTo": "<http://testserver/api/actors/2/>", "summary": "CW: a copied note", "content": "BOB PRIVATE", "inReplyTo": null, "audience": { "public": false }, "attachment": [], "canonicalUrl": "<http://testserver/api/notes/1/>", "objectHash": null }A few thing that were wrong
canonicalUrlandobjectHash. (Don't know where I got these two hahah they probably had a purpose but not anymore)ActivityPub defines the liked collection as "a list of every object from all of the actor's Like activities". So a liked item and a Like's object are the same thing, and this PR gives them one builder
build_like_object_json_ld.