From 25b4031548582139555d0b4ab8352196ac2a56cd Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Mon, 5 Jan 2026 20:25:36 +0100 Subject: [PATCH] chore: pr feedback --- .../modules/notifications/notifications.service.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/server/modules/notifications/notifications.service.ts b/app/server/modules/notifications/notifications.service.ts index 66eaa8f1..e927e9ac 100644 --- a/app/server/modules/notifications/notifications.service.ts +++ b/app/server/modules/notifications/notifications.service.ts @@ -369,10 +369,12 @@ function buildNotificationMessage( snapshotId?: string; }, ) { + const backupName = context.scheduleName ?? "backup"; + switch (event) { case "start": return { - title: `Zerobyte ${context.scheduleName ? context.scheduleName : "backup"} started`, + title: `Zerobyte ${backupName} started`, body: [ `Volume: ${context.volumeName}`, `Repository: ${context.repositoryName}`, @@ -384,7 +386,7 @@ function buildNotificationMessage( case "success": return { - title: `Zerobyte ${context.scheduleName ? context.scheduleName : "backup"} completed successfully`, + title: `Zerobyte ${backupName} completed successfully`, body: [ `Volume: ${context.volumeName}`, `Repository: ${context.repositoryName}`, @@ -400,7 +402,7 @@ function buildNotificationMessage( case "warning": return { - title: `Zerobyte ${context.scheduleName ? context.scheduleName : "backup"} completed with warnings`, + title: `Zerobyte ${backupName} completed with warnings`, body: [ `Volume: ${context.volumeName}`, `Repository: ${context.repositoryName}`, @@ -417,7 +419,7 @@ function buildNotificationMessage( case "failure": return { - title: `Zerobyte ${context.scheduleName ? context.scheduleName : "backup"} failed`, + title: `Zerobyte ${backupName} failed`, body: [ `Volume: ${context.volumeName}`, `Repository: ${context.repositoryName}`, @@ -430,7 +432,7 @@ function buildNotificationMessage( default: return { - title: "Backup Notification", + title: `Zerobyte ${backupName} notification`, body: [ `Volume: ${context.volumeName}`, `Repository: ${context.repositoryName}`,