mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix: album update event emitting (#30120)
This commit is contained in:
parent
73329a8ce8
commit
5d7283e44d
2 changed files with 8 additions and 4 deletions
|
|
@ -351,9 +351,12 @@ export class AssetMediaService extends BaseService {
|
|||
}
|
||||
|
||||
await this.albumRepository.addAssetIds(album.id, [assetId]);
|
||||
for (const { user } of album.albumUsers) {
|
||||
await this.eventRepository.emit('AlbumUpdate', { id: album.id, recipientId: user.id });
|
||||
}
|
||||
const userIds = album.albumUsers.map(({ user }) => user.id);
|
||||
await this.eventRepository.emit('AlbumUpdate', {
|
||||
id: album.id,
|
||||
userIds,
|
||||
recipientIds: userIds,
|
||||
});
|
||||
}
|
||||
|
||||
private requireQuota(auth: AuthDto, size: number) {
|
||||
|
|
|
|||
|
|
@ -216,7 +216,8 @@ describe(AssetService.name, () => {
|
|||
|
||||
expect(ctx.getMock(EventRepository).emit).toHaveBeenCalledWith('AlbumUpdate', {
|
||||
id: album.id,
|
||||
recipientId: user.id,
|
||||
userIds: [user.id],
|
||||
recipientIds: [user.id],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue