fix(server): only asset owner should see favorite status (#20654)

* fix: Any asset update disables isFavorite action in GUI. Only owner of asset in album should see favorited image.

* Fix unit tests

* Fix formatting

* better query, add medium test

* update sql

---------

Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
Paweł Wojtaszko
2025-10-16 23:52:36 +02:00
committed by GitHub
parent 24bfdf3263
commit 505e16c37c
7 changed files with 95 additions and 25 deletions
+5 -1
View File
@@ -162,7 +162,11 @@ export class NotificationService extends BaseService {
const [asset] = await this.assetRepository.getByIdsWithAllRelationsButStacks([assetId]);
if (asset) {
this.eventRepository.clientSend('on_asset_update', userId, mapAsset(asset));
this.eventRepository.clientSend(
'on_asset_update',
userId,
mapAsset(asset, { auth: { user: { id: userId } } as AuthDto }),
);
}
}