diff options
| author | Alexandre Kühn <aku@odoo.com> | 2019-02-13 14:15:42 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2019-02-14 12:55:24 +0000 |
| commit | 62294921b81325131f6c1d4c6cf757c7da457ebc (patch) | |
| tree | ac2f892e1e831a613245ab2486110cc1f92d04f4 /addons/mail/static/src/js/models/threads/dm_chat.js | |
| parent | 9cd8410f693181496dbd946c838c5de4447d0379 (diff) | |
[FIX] mail: enable seen feature only on direct chats
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a
There were performance issue with the seen feature in multi-
user channnels, therefore it has been disabled for them.
As a result, only direct chats have this feature.
Diffstat (limited to 'addons/mail/static/src/js/models/threads/dm_chat.js')
| -rw-r--r-- | addons/mail/static/src/js/models/threads/dm_chat.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/models/threads/dm_chat.js b/addons/mail/static/src/js/models/threads/dm_chat.js index 5e69dbeff8c..0f9d3a32294 100644 --- a/addons/mail/static/src/js/models/threads/dm_chat.js +++ b/addons/mail/static/src/js/models/threads/dm_chat.js @@ -1,13 +1,14 @@ odoo.define('mail.model.DMChat', function (require) { "use strict"; +var ChannelSeenMixin = require('mail.model.ChannelSeenMixin'); var TwoUserChannel = require('mail.model.TwoUserChannel'); /** * Any piece of code in JS that make use of DMs must ideally interact with * such objects, instead of direct data from the server. */ -var DMChat = TwoUserChannel.extend({ +var DMChat = TwoUserChannel.extend(ChannelSeenMixin, { /** * @override * @param {Object} params @@ -21,6 +22,7 @@ var DMChat = TwoUserChannel.extend({ */ init: function (params) { this._super.apply(this, arguments); + ChannelSeenMixin.init.apply(this, arguments); var data = params.data; |
