fix: Any asset update disables isFavorite action in GUI. Only owner of asset in album should see favorited image. #20654
+51
−20
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.
Fixed: Any asset update disables isFavorite action in GUI. Only owner of asset in album should see favorited image.
Description
I was trying to fix issue from link below.
Other than that I noticed that /buckets request was returning isFavorite: true for non asset owners inside album.
There was fix for that long time ago: #7580, but it looks like /buckets request was introduced without that workaround.
Issue from #19089 was caused by previous workaround. I fixed that by passing userId required for recognizing owner.
Fixes # (issue)
How Has This Been Tested?
Main fix:
Additional fix:
Screenshots (if appropriate)
User B only asset is:

Before fix:


User A:
User B:
After fix:


User A:
User B:
Checklist:
src/services/
uses repositories implementations for database calls, filesystem operations, etc.src/repositories/
is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/
)