浏览代码

fix: people in shared assets (#3431)

* fix: people in shared assets

* use empty array
martin 2 年之前
父节点
当前提交
a21112e4ab
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      server/src/immich/api-v1/asset/asset.service.ts

+ 5 - 4
server/src/immich/api-v1/asset/asset.service.ts

@@ -207,12 +207,13 @@ export class AssetService {
 
     const allowExif = this.getExifPermission(authUser);
     const asset = await this._assetRepository.getById(assetId);
+    const data = allowExif ? mapAsset(asset) : mapAssetWithoutExif(asset);
 
-    if (allowExif) {
-      return mapAsset(asset);
-    } else {
-      return mapAssetWithoutExif(asset);
+    if (data.ownerId !== authUser.id) {
+      data.people = [];
     }
+
+    return data;
   }
 
   public async updateAsset(authUser: AuthUserDto, assetId: string, dto: UpdateAssetDto): Promise<AssetResponseDto> {