diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-03-07 18:46:38 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-03-07 18:46:38 +0100 |
| commit | 4aa5ec3fa511e42a08318fe66dde3bd57f0d1f09 (patch) | |
| tree | d3de91d0113164ce313d7eff44c2f25c7e95f743 /addons/im_livechat/controllers | |
| parent | 3c821d4035d0c85f691653c47986d8f4c3dfc51d (diff) | |
| parent | d67b410dfcd67d2540628d4f6be0daf8861c4a46 (diff) | |
[MERGE] forward port branch 11.0 up to d67b410dfcd
Diffstat (limited to 'addons/im_livechat/controllers')
| -rw-r--r-- | addons/im_livechat/controllers/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/im_livechat/controllers/main.py b/addons/im_livechat/controllers/main.py index 11eabd18423..e228524893a 100644 --- a/addons/im_livechat/controllers/main.py +++ b/addons/im_livechat/controllers/main.py @@ -110,7 +110,8 @@ class LivechatController(http.Controller): @http.route('/im_livechat/history', type="json", auth="public") def history_pages(self, pid, channel_uuid, page_history=None): - channel = request.env['mail.channel'].search([('uuid', '=', channel_uuid)]) + partner_ids = (pid, request.env.user.partner_id.id) + channel = request.env['mail.channel'].sudo().search([('uuid', '=', channel_uuid), ('channel_partner_ids', 'in', partner_ids)]) if channel: channel._send_history_message(pid, page_history) return True |
