diff options
| author | Aaron Bohy <aab@odoo.com> | 2016-02-05 10:50:41 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2016-02-08 08:29:53 +0100 |
| commit | 5ba53f3b11ef8cf0c7e6bbdd655ff35d5ffde0ad (patch) | |
| tree | 56d594250ce35dd6b22298a74fc7f3b5267177a1 /addons/mail/static/src/js/window_manager.js | |
| parent | 79a8eeb17d16a12ea7ce8fa946dd610c32035bd0 (diff) | |
[FIX] mail: display user status in chat windows
Diffstat (limited to 'addons/mail/static/src/js/window_manager.js')
| -rw-r--r-- | addons/mail/static/src/js/window_manager.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/window_manager.js b/addons/mail/static/src/js/window_manager.js index a98a9de5cc0..dfd882e02d3 100644 --- a/addons/mail/static/src/js/window_manager.js +++ b/addons/mail/static/src/js/window_manager.js @@ -39,7 +39,10 @@ function open_chat (session) { var chat_session = _.findWhere(chat_sessions, {id: session.id}); if (!chat_session) { var prefix = !session.is_chat ? "#" : ""; - var options = { input_less: session.mass_mailing }; + var options = { + input_less: session.mass_mailing, + status: session.status, + }; chat_session = { id: session.id, uuid: session.uuid, @@ -332,6 +335,14 @@ core.bus.on('web_client_ready', null, function () { } }); + chat_manager.bus.on('update_dm_presence', null, function (channel) { + _.each(chat_sessions, function (session) { + if (channel.id === session.id) { + session.window.update_status(channel.status); + } + }); + }); + chat_manager.is_ready.then(function() { _.each(chat_manager.get_channels(), function (channel) { if (channel.is_detached) { |
