summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/models/threads/dm_chat.js
diff options
context:
space:
mode:
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.js14
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 () {