[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.
This commit is contained in:
Aaron Bohy
2015-10-05 16:37:49 +02:00
parent c5fd4c05b8
commit c3a5f0fb7b
+3 -2
View File
@@ -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 <b>%s</b>.'), self.channel.name);
var msg = _.str.sprintf(_t('You unsubscribed from <b>%s</b>.'), channel.name);
self.do_notify(_t("Unsubscribed"), msg);
});
},