mirror of
https://github.com/immich-app/immich.git
synced 2026-07-28 14:47:30 -07:00
fix: album update event emitting (#30120)
This commit is contained in:
@@ -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],
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user