diff options
| author | Xavier Dubuc <xdu@odoo.com> | 2020-10-27 15:18:57 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-10-27 15:18:57 +0000 |
| commit | 063aa1deccdd6b53d1ab7de68921c95ecf60581c (patch) | |
| tree | 51b65c2c75706e02fd27a242836862e7f372ec3e /addons/mail/static/src/models/user/user.js | |
| parent | 4e660dfdf40a36eed7123bcea2452874238fddd8 (diff) | |
[FIX] mail, im_livechat: allow to reopen closed chat in discuss
task-2346862
closes odoo/odoo#60080
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/user/user.js')
| -rw-r--r-- | addons/mail/static/src/models/user/user.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/mail/static/src/models/user/user.js b/addons/mail/static/src/models/user/user.js index 2decc8efd92..172b8c5b780 100644 --- a/addons/mail/static/src/models/user/user.js +++ b/addons/mail/static/src/models/user/user.js @@ -113,7 +113,9 @@ function factory(dependencies) { thread.model === 'mail.channel' && thread.public === 'private' ); - if (!chat) { + if (!chat ||!chat.isPinned) { + // if chat is not pinned then it has to be pinned client-side + // and server-side, which is a side effect of following rpc chat = await this.async(() => this.env.models['mail.thread'].performRpcCreateChat({ partnerIds: [this.partner.id], |
