From 7a25a9f5b4c437621937a936098eb9a43870e28a Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Wed, 25 Feb 2026 23:04:13 -0600 Subject: [PATCH] feat: add custom notification support for volume backup status updates --- .../src/utils/notifications/volume-backup.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/server/src/utils/notifications/volume-backup.ts b/packages/server/src/utils/notifications/volume-backup.ts index 78f1f263f..353afa0a4 100644 --- a/packages/server/src/utils/notifications/volume-backup.ts +++ b/packages/server/src/utils/notifications/volume-backup.ts @@ -5,6 +5,7 @@ import { renderAsync } from "@react-email/components"; import { format } from "date-fns"; import { and, eq } from "drizzle-orm"; import { + sendCustomNotification, sendDiscordNotification, sendEmailNotification, sendGotifyNotification, @@ -59,6 +60,7 @@ export const sendVolumeBackupNotifications = async ({ ntfy: true, pushover: true, teams: true, + custom: true, }, }); @@ -73,6 +75,7 @@ export const sendVolumeBackupNotifications = async ({ ntfy, pushover, teams, + custom, } = notification; if (email || resend) { @@ -323,5 +326,25 @@ export const sendVolumeBackupNotifications = async ({ facts, }); } + + if (custom) { + await sendCustomNotification(custom, { + title: `Volume Backup ${type === "success" ? "Successful" : "Failed"}`, + message: + type === "success" + ? "Volume backup completed successfully" + : "Volume backup failed", + projectName, + applicationName, + volumeName, + serviceType, + type, + errorMessage: errorMessage ?? "", + backupSize: backupSize ?? "", + timestamp: date.toISOString(), + date: date.toLocaleString(), + status: type, + }); + } } };