From c3a5f0fb7b34acc679cfe4437b19bbf00c5f3452 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Mon, 5 Oct 2015 12:07:47 +0200 Subject: [PATCH] [FIX] mail: client action: channel unsubscribe notification Correctly display the name of the unsubscribed channel in the notification, not the name of the channel we switched to afterwards. --- addons/mail/static/src/js/client_action.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/js/client_action.js b/addons/mail/static/src/js/client_action.js index 1e46171c745..db123e68c44 100644 --- a/addons/mail/static/src/js/client_action.js +++ b/addons/mail/static/src/js/client_action.js @@ -460,12 +460,13 @@ var ChatAction = Widget.extend(ControlPanelMixin, { on_click_button_unsubscribe: function () { var self = this; + var channel = this.channel; chat_manager - .unsubscribe(this.channel) + .unsubscribe(channel) .then(this.set_channel.bind(this, chat_manager.get_channel("channel_inbox"))) .then(this.render_sidebar.bind(this)) .then(function () { - var msg = _.str.sprintf(_t('You unsubscribed from %s.'), self.channel.name); + var msg = _.str.sprintf(_t('You unsubscribed from %s.'), channel.name); self.do_notify(_t("Unsubscribed"), msg); }); },