Browse Source

[IMP] added overrides update_message_on_current_channel() in ChatAction for update channels

pull/36/head
x620 9 years ago
parent
commit
6914d4be53
  1. 6
      mail_archives/static/src/js/archives.js
  2. 6
      mail_sent/static/src/js/sent.js

6
mail_archives/static/src/js/archives.js

@ -23,6 +23,12 @@ ChatAction.include({
var channel_name = 'channel_archive'; var channel_name = 'channel_archive';
// Add channel Archive for enable "display_subject" option // Add channel Archive for enable "display_subject" option
this.channels_display_subject.push(channel_name); this.channels_display_subject.push(channel_name);
},
update_message_on_current_channel: function(current_channel_id, message){
var result = this._super.apply(this, arguments);
var archive = current_channel_id === "channel_archive" && !message.is_archive;
return archive || result;
} }
}); });

6
mail_sent/static/src/js/sent.js

@ -54,6 +54,12 @@ base_obj.MailTools.include({
['sent', '=', true], ['sent', '=', true],
['author_id.user_ids', 'in', [openerp.session.uid]] ['author_id.user_ids', 'in', [openerp.session.uid]]
] : this._super.apply(this, arguments); ] : this._super.apply(this, arguments);
},
update_message_on_current_channel: function(current_channel_id, message){
var result = this._super.apply(this, arguments);
var sent = current_channel_id === "channel_sent" && !message.is_sent;
return sent || result;
} }
}); });

Loading…
Cancel
Save