diff --git a/app/assets/javascripts/discourse/app/controllers/ignore-duration.js b/app/assets/javascripts/discourse/app/controllers/ignore-duration.js index 929581be2ef..77e77f3e95e 100644 --- a/app/assets/javascripts/discourse/app/controllers/ignore-duration.js +++ b/app/assets/javascripts/discourse/app/controllers/ignore-duration.js @@ -18,7 +18,7 @@ export default Controller.extend(ModalFunctionality, { this.set("loading", true); this.model .updateNotificationLevel({ - level: "ignored", + level: "ignore", expiringAt: this.ignoredUntil, }) .then(() => { diff --git a/app/assets/javascripts/discourse/app/controllers/user.js b/app/assets/javascripts/discourse/app/controllers/user.js index 49199aafd78..9567758f050 100644 --- a/app/assets/javascripts/discourse/app/controllers/user.js +++ b/app/assets/javascripts/discourse/app/controllers/user.js @@ -168,14 +168,19 @@ export default Controller.extend(CanCheckEmails, { "currentUser.ignored_ids", "model.ignored", "model.muted", - function () { - if (this.get("model.ignored")) { - return "changeToIgnored"; - } else if (this.get("model.muted")) { - return "changeToMuted"; - } else { - return "changeToNormal"; - } + { + get() { + if (this.get("model.ignored")) { + return "changeToIgnored"; + } else if (this.get("model.muted")) { + return "changeToMuted"; + } else { + return "changeToNormal"; + } + }, + set(key, value) { + return value; + }, } ), @@ -250,7 +255,7 @@ export default Controller.extend(CanCheckEmails, { }, updateNotificationLevel(level) { - return this.model.updateNotificationLevel({ level }); + return this.model.updateNotificationLevel(level); }, }, }); diff --git a/app/assets/javascripts/discourse/app/templates/modal/ignore-duration.hbs b/app/assets/javascripts/discourse/app/templates/modal/ignore-duration.hbs index cabbb66960a..566b60f21a7 100644 --- a/app/assets/javascripts/discourse/app/templates/modal/ignore-duration.hbs +++ b/app/assets/javascripts/discourse/app/templates/modal/ignore-duration.hbs @@ -11,7 +11,7 @@ {{/d-modal-body}}