Skip to content

Fix: Add missing volumeBackup field to 5 notification providers on creation#4109

Open
mahdirajaee wants to merge 1 commit intoDokploy:canaryfrom
mahdirajaee:fix/notification-volume-backup
Open

Fix: Add missing volumeBackup field to 5 notification providers on creation#4109
mahdirajaee wants to merge 1 commit intoDokploy:canaryfrom
mahdirajaee:fix/notification-volume-backup

Conversation

@mahdirajaee
Copy link
Copy Markdown

@mahdirajaee mahdirajaee commented Mar 30, 2026

Summary

Fixes #4084

Several notification creation functions in packages/server/src/services/notification.ts were missing the volumeBackup field in their .values() insert, causing volume backup notification preferences to be silently discarded (defaulting to false) when creating notifications for these providers.

Affected functions

  • createCustomNotification — missing volumeBackup in insert
  • createLarkNotification — missing volumeBackup in insert
  • createMattermostNotification — missing volumeBackup in insert
  • updateMattermostNotification — missing volumeBackup in update set

Root cause

When these notification providers were added, the volumeBackup field was not included in the notification insert/update values, even though their corresponding update functions (for Custom and Lark) and other providers (Slack, Telegram, Discord, Email, Resend, Pushover, Teams) all correctly include it.

Fix

Added volumeBackup: input.volumeBackup after databaseBackup: input.databaseBackup in each affected function, matching the pattern used by all other notification providers.

Context

The Dosu bot confirmed this inconsistency in the issue discussion, also referencing the related user report in #3768 where custom webhook notifications were not working for volume backups.

Greptile Summary

This PR fixes a silent data-loss bug where the volumeBackup preference was being discarded (silently defaulting to false) when creating or updating notifications for the Custom, Lark, and Mattermost providers. The fix adds volumeBackup: input.volumeBackup to the four affected functions, matching the pattern already used by all other providers (Slack, Telegram, Discord, Email, Resend, Gotify, Ntfy, Pushover, Teams). After the change, all 24 insert/update operations in notification.ts are consistent.

  • createCustomNotificationvolumeBackup now persisted on creation
  • createLarkNotificationvolumeBackup now persisted on creation
  • createMattermostNotificationvolumeBackup now persisted on creation
  • updateMattermostNotificationvolumeBackup now persisted on update
  • Minor: the PR title refers to "5 notification providers" while the diff contains 4 changes and the description lists 4 functions — a cosmetic discrepancy with no code impact.

Confidence Score: 5/5

Safe to merge — the change is a straightforward, targeted bug fix with no new logic introduced.

All 24 insert/update operations now consistently include volumeBackup. The fix is minimal, directly mirrors the pattern already established by the other providers, and verified to be complete via a full field-count audit. No regressions or side-effects are expected.

No files require special attention.

Important Files Changed

Filename Overview
packages/server/src/services/notification.ts Adds the missing volumeBackup: input.volumeBackup field to four functions — createCustomNotification, createLarkNotification, createMattermostNotification, and updateMattermostNotification — bringing them into parity with all other notification providers.

Reviews (1): Last reviewed commit: "Fix missing volumeBackup field in notifi..." | Re-trigger Greptile

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gotify, Ntfy, Lark, Mattermost, and Custom notification providers silently drop volumeBackup on creation

1 participant