diff options
| author | mgh-odoo <mgh@odoo.com> | 2019-07-10 10:53:10 +0000 |
|---|---|---|
| committer | mgh-odoo <mgh@odoo.com> | 2019-08-14 12:25:12 +0000 |
| commit | 737746c05c832bce918d16c445a84c5d1f9290e4 (patch) | |
| tree | 027cf088a3940e075e99d555e093159f06c01a34 /addons/im_livechat/controllers | |
| parent | 3d9abe633282c7eb47b46da0faeab64f98319b38 (diff) | |
[IMP] im_livechat: allow visitors to get a transcript of their live chat
after this commit user can get a copy of the conversation with operator
task-2029660
closes #34620
closes odoo/odoo#35083
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Diffstat (limited to 'addons/im_livechat/controllers')
| -rw-r--r-- | addons/im_livechat/controllers/main.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/im_livechat/controllers/main.py b/addons/im_livechat/controllers/main.py index 8e56c2279f3..b90a418f8cd 100644 --- a/addons/im_livechat/controllers/main.py +++ b/addons/im_livechat/controllers/main.py @@ -148,3 +148,9 @@ class LivechatController(http.Controller): Channel = request.env['mail.channel'] channel = Channel.sudo().search([('uuid', '=', uuid)], limit=1) channel.notify_typing(is_typing=is_typing, is_website_user=True) + + @http.route('/im_livechat/email_livechat_transcript', type='json', auth='public', cors="*") + def email_livechat_transcript(self, uuid, email): + channel = request.env['mail.channel'].sudo().search([('uuid', '=', uuid)], limit=1) + if channel: + channel._email_livechat_transcript(email) |
