diff options
| author | XavierDo <xdo@odoo.com> | 2019-01-07 12:31:18 +0000 |
|---|---|---|
| committer | XavierDo <xdo@odoo.com> | 2019-02-07 08:54:33 +0000 |
| commit | c21d200285ebeb646b8e5be6ba233f96d9714c6f (patch) | |
| tree | 456e22dba6bd235f1ed1143b224097f6a0e0f1dd /addons/mail/static/src/js/models/threads | |
| parent | b60224c41cb6c9817fd328bb60b21681e619fb26 (diff) | |
[IMP] mail: add ooo status in chats windows.
In a chat window with a single usert (dm_chat) the ooo status of the
other user is displayed on the top when set.
Task: 1856205
Diffstat (limited to 'addons/mail/static/src/js/models/threads')
| -rw-r--r-- | addons/mail/static/src/js/models/threads/dm_chat.js | 14 |
1 files changed, 14 insertions, 0 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 4967a1e9963..21fb72e91ae 100644 --- a/addons/mail/static/src/js/models/threads/dm_chat.js +++ b/addons/mail/static/src/js/models/threads/dm_chat.js @@ -1,7 +1,9 @@ odoo.define('mail.model.DMChat', function (require) { "use strict"; +var core = require('web.core'); var TwoUserChannel = require('mail.model.TwoUserChannel'); +var _t = core._t; /** * Any piece of code in JS that make use of DMs must ideally interact with @@ -18,6 +20,7 @@ var DMChat = TwoUserChannel.extend({ * @param {integer} params.data.direct_partner[0].id * @param {string} params.data.direct_partner[0].im_status * @param {string} params.data.direct_partner[0].name + * @param {string} [params.data.direct_partner[0].out_of_office_message=''] */ init: function (params) { this._super.apply(this, arguments); @@ -51,6 +54,17 @@ var DMChat = TwoUserChannel.extend({ return this._directPartnerID; }, /** + * Get the out of office message of the thread + * + * @returns {string} + */ + getOutOfOfficeMessage: function () { + if (this._outOfOfficeMessage === '') { + return undefined; + } + return this._outOfOfficeMessage; + }, + /** * @override */ getPreview: function () { |
