mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	fix(server): create shared album from the mobile app does not trigger send email invite (#11911)
* fix(server): create shared album from the mobile app does not trigger send email invite * remove unused value
This commit is contained in:
		
							parent
							
								
									2237b7a399
								
							
						
					
					
						commit
						af3a793fe8
					
				@ -205,6 +205,10 @@ describe(AlbumService.name, () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      expect(userMock.get).toHaveBeenCalledWith('user-id', {});
 | 
					      expect(userMock.get).toHaveBeenCalledWith('user-id', {});
 | 
				
			||||||
      expect(accessMock.asset.checkOwnerAccess).toHaveBeenCalledWith(authStub.admin.user.id, new Set(['123']));
 | 
					      expect(accessMock.asset.checkOwnerAccess).toHaveBeenCalledWith(authStub.admin.user.id, new Set(['123']));
 | 
				
			||||||
 | 
					      expect(eventMock.emit).toHaveBeenCalledWith('onAlbumInvite', {
 | 
				
			||||||
 | 
					        id: albumStub.empty.id,
 | 
				
			||||||
 | 
					        userId: 'user-id',
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    it('should require valid userIds', async () => {
 | 
					    it('should require valid userIds', async () => {
 | 
				
			||||||
 | 
				
			|||||||
@ -138,6 +138,10 @@ export class AlbumService {
 | 
				
			|||||||
      albumThumbnailAssetId: assets[0]?.id || null,
 | 
					      albumThumbnailAssetId: assets[0]?.id || null,
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for (const { userId } of albumUsers) {
 | 
				
			||||||
 | 
					      await this.eventRepository.emit('onAlbumInvite', { id: album.id, userId });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return mapAlbumWithAssets(album);
 | 
					    return mapAlbumWithAssets(album);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user