Skip to content

Iterating over Liked private likes filters - #323

Merged
aaronjae22 merged 2 commits into
mainfrom
liked-private-likes
Oct 9, 2026
Merged

aaronjae22 merged 2 commits into
mainfrom
liked-private-likes

Conversation

@aaronjae22

Copy link
Copy Markdown
Collaborator

The liked collection was keeping only public Likes even though the endpoint already requires a portability token bound to the account. The filter was only doing one thing which was hiding an account's own private and followers-only Likes from that account's own token. Those Likes never reach the destination and nothing tells the user.

Alice has one public, one followers-only and one private Like, and fetches her liked collection with her own token and it was receivingliked totalItems = 1 of 3

LOLA §6.4 expects the source to provide the liked collection to the migration token "No changes should need to be made", and we were dropping data without warning anyone so this is a change on it.

The content collection and the outbox both give a bound token every visibility, the liked collection was the only one that didn't.

There's a second little isue. Signup provisioning made every Like public because of this filter. So a new account never had a non-public Like.

Current

  • liked_collection filters visibility="public" beneath the strict scope gate
  • Provisioning creates 6 Likes, all public

⠀After this PR

  • The filter is gone and now the owner's token gets every Like the owner made
  • Provisioning creates Likes through public, followers-only and private, as it already does for Notes
Alice:            liked totalItems = 3 of 3
Provisioned actor: Like rows {public: 2, followers-only: 2, private: 2}
                   liked collection, owner's token: 6
                   Likes in the anonymous outbox:   2   (it still shows public Likes only)

@aaronjae22
aaronjae22 requested a review from lisad October 5, 2026 21:14
@aaronjae22 aaronjae22 self-assigned this Oct 5, 2026
@aaronjae22
aaronjae22 added this pull request to stack #321 October 5, 2026 21:14
@aaronjae22 aaronjae22 changed the title Liked private likes Iterating over Liked private likes Oct 5, 2026
@aaronjae22 aaronjae22 changed the title Iterating over Liked private likes Iterating over Liked private likes filters Oct 5, 2026
actor=actor,
timestamp=liked_at,
visibility="public",
visibility=VISIBILITIES[(number - 1) % len(VISIBILITIES)],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A cool option for this idiom is to have the function or object own a couple cycles. From python 'itertools.cycle'

visibilities = cycle(VISIBILITIES)

for i in range(NOTE_COUNT):
...
visibility = next(visibility)
...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, that would be much cleaner. I'll do it in the follow up PR

@aaronjae22
aaronjae22 force-pushed the liked-private-likes branch from 476a5c9 to 23ab6b6 Compare October 9, 2026 16:07
Base automatically changed from like-object-embedding to main October 9, 2026 16:25
@aaronjae22
aaronjae22 force-pushed the liked-private-likes branch from 23ab6b6 to 096947f Compare October 9, 2026 16:25
@aaronjae22
aaronjae22 merged commit 0382258 into main Oct 9, 2026
3 checks passed
@aaronjae22
aaronjae22 deleted the liked-private-likes branch October 9, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants