summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2019-01-31 16:23:57 +0000
committerAlexandre Kühn <aku@odoo.com>2019-02-01 14:21:47 +0000
commite8f7770a13d6ddc1cb8ec1bcebcb22e21962ba52 (patch)
treed22dfdcf8d61b6c5a863a1648b1054039ae602c1 /addons/web/static/src/js/views/basic/basic_controller.js
parent9ff018a2b75c281462048fc3c751cfcc78394e11 (diff)
[FIX] mail: do not open chat window twice
Revision on https://github.com/odoo/odoo/commit/0d87b1ccea07b952d9079008cfa3cddaf1ccdbee The commit above prevents opening a chat window when we do not have access to messages of the conversation. This may happen when receiving a notification from a document we do not have access rights. However, the changes in the code above has an unintended side-effect of opening a chat window twice when clicking on a channel preview from the systray messaging menu. This happens because when clicking on a preview, it detaches the thread and opens the chat window. Meanwhile, there is a RPC to notify that the chat window is detached, and the new window state of the channel is received on the longpolling. Two concurrent attempts to open a chat window occur at the same. It was working fine before the commit above, because the registering of a newly open chat window was synchronous. This is however no longer the case, because it fetches messages beforehand: it has become a requirement to open a chat window. Since the registering of a newly open chat window is now asynchronous, it was fetching messages and opening the chat window twice. This commit fixes the issue by aborting attempt to open a chat window if it's currently opening a chat window, as this process may take some time due to the `message_fetch` RPC. closes odoo/odoo#30741
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions