mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:17:11 -05:00 
			
		
		
		
	fix: people in shared assets (#3431)
* fix: people in shared assets * use empty array
This commit is contained in:
		
							parent
							
								
									f3edf43158
								
							
						
					
					
						commit
						a21112e4ab
					
				@ -207,12 +207,13 @@ export class AssetService {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    const allowExif = this.getExifPermission(authUser);
 | 
					    const allowExif = this.getExifPermission(authUser);
 | 
				
			||||||
    const asset = await this._assetRepository.getById(assetId);
 | 
					    const asset = await this._assetRepository.getById(assetId);
 | 
				
			||||||
 | 
					    const data = allowExif ? mapAsset(asset) : mapAssetWithoutExif(asset);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (allowExif) {
 | 
					    if (data.ownerId !== authUser.id) {
 | 
				
			||||||
      return mapAsset(asset);
 | 
					      data.people = [];
 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
      return mapAssetWithoutExif(asset);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return data;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  public async updateAsset(authUser: AuthUserDto, assetId: string, dto: UpdateAssetDto): Promise<AssetResponseDto> {
 | 
					  public async updateAsset(authUser: AuthUserDto, assetId: string, dto: UpdateAssetDto): Promise<AssetResponseDto> {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user