fix(notification): ensure applyExisting is not saved to database (#7221)
Automatically close stale issues / stale (push) Has been cancelled
Auto Test / auto-test (20, macos-latest) (push) Has been cancelled
Auto Test / auto-test (20, ubuntu-22.04) (push) Has been cancelled
Auto Test / auto-test (20, ubuntu-22.04-arm) (push) Has been cancelled
Auto Test / auto-test (20, windows-latest) (push) Has been cancelled
Auto Test / auto-test (24, macos-latest) (push) Has been cancelled
Auto Test / auto-test (24, ubuntu-22.04) (push) Has been cancelled
Auto Test / auto-test (24, ubuntu-22.04-arm) (push) Has been cancelled
Auto Test / auto-test (24, windows-latest) (push) Has been cancelled
Auto Test / auto-test (25, ubuntu-22.04) (push) Has been cancelled
Auto Test / armv7-simple-test (20) (push) Has been cancelled
Auto Test / armv7-simple-test (22) (push) Has been cancelled
Auto Test / check-linters (push) Has been cancelled
Auto Test / e2e-test (push) Has been cancelled
autofix.ci / autofix (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / zizmor (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
validate / json-yaml-validate (push) Has been cancelled
validate / validate (push) Has been cancelled
NPM Update / npm-update (push) Has been cancelled
Nightly Release / release-nightly (push) Has been cancelled
Build Docker Push Image / build-docker-push (push) Has been cancelled

This commit is contained in:
Louis Lam
2026-03-29 23:12:44 +08:00
committed by GitHub
parent 7188e054d8
commit a5f30d4cc8
2 changed files with 9 additions and 1 deletions
+5 -1
View File
@@ -251,13 +251,17 @@ class Notification {
bean = R.dispense("notification");
}
// applyExisting is one time only, don't save it to database.
const applyExisting = notification.applyExisting || false;
notification.applyExisting = false;
bean.name = notification.name;
bean.user_id = userID;
bean.config = JSON.stringify(notification);
bean.is_default = notification.isDefault || false;
await R.store(bean);
if (notification.applyExisting) {
if (applyExisting) {
await applyNotificationEveryMonitor(bean.id, userID);
}