fix(server): hide isFavorite from partner asset sync stream#28035
Open
timonrieger wants to merge 3 commits intomainfrom
Open
fix(server): hide isFavorite from partner asset sync stream#28035timonrieger wants to merge 3 commits intomainfrom
timonrieger wants to merge 3 commits intomainfrom
Conversation
381a0f5 to
cdd47f3
Compare
10 tasks
Collaborator
Author
yes that's right. I pushed up the change for the new column |
jrasm91
approved these changes
Apr 28, 2026
jrasm91
approved these changes
Apr 28, 2026
Member
jrasm91
left a comment
There was a problem hiding this comment.
This is great, but it doesn't do anything to fix the data that we've already synced. Can you add a migration that resets the session_checkpoint table for the relevant types?
Related, I wonder if we also have this same issue for album assets, which are shared. Do you mind checking if we need to do something for that case as well?
| return this.upsertQuery('asset', options) | ||
| .select(columns.syncAsset) | ||
| .select(columns.syncPartnerAsset) | ||
| .select(sql<boolean>`false`.as('isFavorite')) |
Member
There was a problem hiding this comment.
Suggested change
| .select(sql<boolean>`false`.as('isFavorite')) | |
| .select(sql.val(false).as('isFavorite')) |
Does this work instead?
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.
Description
The
/sync/streamendpoint sends rawisFavoritevalues for partner assets, leaking whether a partner hasfavorited their photos to users they've shared with.
The
/timeline/bucketendpoint already filters this (returnsfalsewhenownerId !== auth.user.id), sothe old timeline was unaffected. But the new drift-based timeline reads directly from the local DB
(populated via the sync stream), so partner favorites were visible.
This PR fixes the sync stream by always sending
falseforisFavoriteon partner assets in bothgetBackfillandgetUpsertsofPartnerAssetsSync.Fixes #21968
Follows up on client-side fix in #24651
How Has This Been Tested?
isFavorite: falsefor partner assetsisFavorite)Checklist:
src/services/uses repositories implementations for database calls, filesystemoperations, etc.
src/repositories/is pretty basic/simple and does not have any immich specific logic(that belongs in
src/services/)Please describe to which degree, if any, an LLM was used in creating this pull request.
LLM (Claude) was used to identify the affected query methods and draft the implementation.