summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_windows
diff options
context:
space:
mode:
authorXavierDo <xdo@odoo.com>2019-01-07 12:31:18 +0000
committerXavierDo <xdo@odoo.com>2019-02-07 08:54:33 +0000
commitc21d200285ebeb646b8e5be6ba233f96d9714c6f (patch)
tree456e22dba6bd235f1ed1143b224097f6a0e0f1dd /addons/mail/static/src/js/thread_windows
parentb60224c41cb6c9817fd328bb60b21681e619fb26 (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/thread_windows')
-rw-r--r--addons/mail/static/src/js/thread_windows/abstract_thread_window.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/thread_windows/abstract_thread_window.js b/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
index 3e4e2e16325..da958c1c5f1 100644
--- a/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
+++ b/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
@@ -148,6 +148,22 @@ var AbstractThreadWindow = Widget.extend({
return this._thread;
},
/**
+ * Get out of office user text
+ *
+ * @returns {string|undefined}
+ */
+ getOutOfOfficeMessage: function () {
+ if (
+ !(
+ this.hasThread() &&
+ this._thread.getType() === 'dm_chat'
+ )
+ ) {
+ return undefined;
+ }
+ return this._thread.getOutOfOfficeMessage();
+ },
+ /**
* Get the status of the thread, such as the im status of a DM chat
* ('online', 'offline', etc.). If this window has no thread, returns
* `undefined`.