feat: batched auto-rules emails, thumbnail fallback, and approve form

This commit is contained in:
Leon Tonhäuser committed 2026-08-11 12:52:01 +02:00
1 parent 4667615ed0
commit 9fdd76645c
8 files changed
+196 -61

No files matched your search

+6 -4
View File
@@ -62,6 +62,7 @@ export function createAutoRuleService({
const grantedAlbumIds = new Set(await grantService.getGrantedAlbumIds(editorialId));
let newlyGranted = 0;
const newlyGrantedAlbumNames: string[] = [];
let editorialEmail: string | undefined;
try {
@@ -88,16 +89,17 @@ export function createAutoRuleService({
await grantService.grantAlbum({ editorialId, immichAlbumId: album.id, adminUserId });
newlyGranted++;
grantedAlbumIds.add(album.id);
if (editorialEmail) {
await emailService.sendNewAlbumNotification(editorialEmail, album.albumName).catch(() => {});
}
newlyGrantedAlbumNames.push(album.albumName);
} catch (error) {
// Ignore individual album grant failures
}
}
}
if (newlyGrantedAlbumNames.length > 0 && editorialEmail) {
await emailService.sendNewAlbumNotification(editorialEmail, newlyGrantedAlbumNames).catch(() => {});
}
return { granted: newlyGranted };
},
};