mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -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
2 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue