diff --git a/addons/mail/static/src/js/discuss.js b/addons/mail/static/src/js/discuss.js index 3b405761169..2142a21da4a 100644 --- a/addons/mail/static/src/js/discuss.js +++ b/addons/mail/static/src/js/discuss.js @@ -99,7 +99,7 @@ var PartnerInviteDialog = Dialog.extend({ self.do_notify(_t('New people'), notification); // Clear the membersDeferred to fetch again the partner // when getMentionPartnerSuggestions from the chatManager is triggered - var channel = this.call('chat_manager', 'getChannel', self.channelID); + var channel = self.call('chat_manager', 'getChannel', self.channelID); delete channel.membersDeferred; }); } @@ -508,7 +508,7 @@ var Discuss = Widget.extend(ControlPanelMixin, { */ _selectMessage: function (messageID) { this.$el.addClass('o_mail_selection_mode'); - var message = this._getMessage(messageID); + var message = this.call('chat_manager', 'getMessage', messageID);; this.selected_message = message; var subject = "Re: " + message.record_name; this.extendedComposer.set_subject(subject); @@ -903,10 +903,10 @@ var Discuss = Widget.extend(ControlPanelMixin, { if (def) { def.then(function (value) { if (value !== 'granted') { - self._sendNotification(self, _t('Permission denied'), + self.call('bus_service', 'sendNotification', self, _t('Permission denied'), _t('Odoo will not have the permission to send native notifications on this device.')); } else { - self._sendNotification(self, _t('Permission granted'), + self.call('bus_service', 'sendNotification', self, _t('Permission granted'), _t('Odoo has now the permission to send you native notifications on this device.')); } }); @@ -963,7 +963,7 @@ var Discuss = Widget.extend(ControlPanelMixin, { * @private */ _onUnsubscribeButtonClicked: function () { - this._unsubscribe(this.channel); + this.call('chat_manager', 'unsubscribe', this.channel); }, });