1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02: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:
Alex 2024-08-19 15:43:57 -05:00 committed by GitHub
parent 2237b7a399
commit af3a793fe8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -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 () => {

View File

@ -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);
} }