diff options
| author | Aaron Bohy <aab@odoo.com> | 2015-12-10 16:33:46 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2015-12-16 15:48:43 +0100 |
| commit | 5d1b3232fc02d3c0a7f10e6bb73e308596c3a5a5 (patch) | |
| tree | 10bce856ab35fd212e0bfb2e459ff9e899aff1c6 /addons/mail/static/src/xml/client_action.xml | |
| parent | 89ba0a811b9cb10ba6747487eb97a35e3300a924 (diff) | |
[FIX] bus,mail: user presence
Before this rev., no notification was sent on the bus when the user presence
changed. Thus, the bullets displayed in Discuss were never updated and stayed
as they were on the initialilization of the chat_manager (on webclient launch).
This rev. makes the bus.presence notifications work, and handles them client
side.
Moreover, the disconnections detection is now performed at each poll (with a
maximum of 1 per minute), instead of randomly (1/100 chance) at each poll, as
it scales better than the former solution. We also added a cron that performs
this check every 5 minutes. It is needed to detect that the last connected user
just disconnected (useful for visitors in the website, trying to talk with a
livechat operator).
Also, the 'away' status is now handled client side, as it makes more sense
that way (being away at each poll, e.g. every 50seconds, during 10 minutes
doesn't mean that we didn't come back between two polls).
Finaly, in bus.js, CrossTabBus, we moved the code writing in/reading the local
storage after the tab registration as this code depends on the fact that the
tab is the master tab or not (and this is known only once the tab is
registered).
This rev. was necessary in stable because the livechat uses the user status to
detect if there is an operator available, and this was often inaccurate.
Moreover, it improves the user experience of the chat in the backend.
Diffstat (limited to 'addons/mail/static/src/xml/client_action.xml')
| -rw-r--r-- | addons/mail/static/src/xml/client_action.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/xml/client_action.xml b/addons/mail/static/src/xml/client_action.xml index 11b32ee0e8d..bb29d8cca27 100644 --- a/addons/mail/static/src/xml/client_action.xml +++ b/addons/mail/static/src/xml/client_action.xml @@ -77,7 +77,7 @@ <t t-set="counter" t-value="channel.needaction_counter"/> <div t-if="channel.type === channel_type" t-att-data-channel-id="channel.id" t-attf-class="o_mail_chat_channel_item #{channel.unread_counter ? ' o_unread_message' : ''} #{(active_channel_id == channel.id) ? 'o_active': ''}"> - <span><i t-if="display_status" t-att-class="'o_user_status fa ' + (channel.status == 'online' ? 'fa-circle' : 'fa-circle-o')"/></span> + <span><i t-if="display_status" t-att-class="'o_user_status fa ' + (channel.status == 'online' ? 'fa-circle' : (channel.status == 'away' ? 'fa-clock-o' : 'fa-circle-o'))" t-attf-title="#{channel.status}"/></span> <span t-if="display_hash" class="o_mail_hash">#</span> <t t-esc="channel.name"/> <i t-if="channel.mass_mailing" class="fa fa-envelope-o"/> |
