[FIX] mail: update dm chat ok for f2302dfb
In f2302df dm type of channel was renamed to dm_chat, this commit takes
this into account in other part of the code.
This commit is contained in:
@@ -445,7 +445,7 @@ var MailManager = AbstractService.extend({
|
||||
var channel = this.getChannel(data.id);
|
||||
if (!channel) {
|
||||
channel = this._makeChannel(data, options);
|
||||
if (channel.getType() === 'dm') {
|
||||
if (channel.getType() === 'dm_chat') {
|
||||
this._pinnedDmPartners.push(channel.getDirectPartnerID());
|
||||
this.call('bus_service', 'updateOption',
|
||||
'bus_presence_partner_ids',
|
||||
@@ -1048,7 +1048,7 @@ var MailManager = AbstractService.extend({
|
||||
userIDs[0] !== session.uid &&
|
||||
dmRedirection
|
||||
) {
|
||||
self.createChannel(resID, 'dm').then(dmRedirection);
|
||||
self.createChannel(resID, 'dm_chat').then(dmRedirection);
|
||||
} else {
|
||||
self._redirectToDocument(resModel, resID);
|
||||
}
|
||||
@@ -1064,7 +1064,7 @@ var MailManager = AbstractService.extend({
|
||||
*/
|
||||
_removeChannel: function (channel) {
|
||||
if (!channel) { return; }
|
||||
if (channel.getType() === 'dm') {
|
||||
if (channel.getType() === 'dm_chat') {
|
||||
var index = this._pinnedDmPartners.indexOf(channel.getDirectPartnerID());
|
||||
if (index > -1) {
|
||||
this._pinnedDmPartners.splice(index, 1);
|
||||
|
||||
@@ -418,7 +418,7 @@ MailManager.include({
|
||||
var blankThreadWindow = this._getBlankThreadWindow();
|
||||
if (
|
||||
blankThreadWindow &&
|
||||
thread.getType() === 'dm' &&
|
||||
thread.getType() === 'dm_chat' &&
|
||||
thread.getDirectPartnerID() === blankThreadWindow.directPartnerID
|
||||
) {
|
||||
// the window takes the place of the 'blank' thread window
|
||||
|
||||
@@ -24,7 +24,7 @@ tour.register('mail_tour', [{
|
||||
content: _t("Once a message has been starred, you can come back and review it at any time here."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: '.o_mail_discuss .o_mail_discuss_sidebar .o_add[data-type="dm"]',
|
||||
trigger: '.o_mail_discuss .o_mail_discuss_sidebar .o_add[data-type="dm_chat"]',
|
||||
content: _t("<p><b>Chat with coworkers</b> in real-time using direct messages.</p><p><i>You might need to invite users from the Settings app first.</i></p>"),
|
||||
position: 'bottom',
|
||||
}]);
|
||||
|
||||
Reference in New Issue
Block a user