unsubscribe_from_channel: function (channel) {
     var self = this;
     chat_manager
         .unsubscribe(channel)
         .then(this.render_sidebar.bind(this))
         .then(this.set_channel.bind(this, chat_manager.get_channel("channel_inbox")))
         .then(function () {
             if (_.contains(['public', 'private'], channel.type)) {
                 var msg = _.str.sprintf(_t('You unsubscribed from <b>%s</b>.'), channel.name);
                 self.do_notify(_t("Unsubscribed"), msg);
             }
             delete self.channels_scrolltop[channel.id];
         });
 },
Example #2
0
 on_click_button_unsubscribe: function () {
     chat_manager.unsubscribe(this.channel);
 },
Example #3
0
 "click .o_mail_partner_unpin": function (event) {
     event.stopPropagation();
     var channel_id = $(event.target).data("channel-id");
     chat_manager.unsubscribe(chat_manager.get_channel(channel_id));
 },