瀏覽代碼

fix(server): send upload_success notification only for non hidden assets (#5471)

Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
shenlong 1 年之前
父節點
當前提交
812e67d55d
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      server/src/domain/job/job.service.ts

+ 3 - 1
server/src/domain/job/job.service.ts

@@ -223,7 +223,9 @@ export class JobService {
         }
 
         const [asset] = await this.assetRepository.getByIds([item.data.id]);
-        if (asset) {
+
+        // Only live-photo motion part will be marked as not visible immediately on upload. Skip notifying clients
+        if (asset && asset.isVisible) {
           this.communicationRepository.send(CommunicationEvent.UPLOAD_SUCCESS, asset.ownerId, mapAsset(asset));
         }
       }