From e2fbff551113bc4166a44b3e99cbf1ce2ad75e8a Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Tue, 23 May 2023 13:56:31 +0000 Subject: [PATCH] [FIX] im_livechat: fix chatbot restart message display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Markup usage has been enforced in the mail module since [1]. Since the `chatbot_restart` method doesn't make use of it, the content is escaped and the whole html structure is printed to the DOM. This PR fixes this issue. [1] https://github.com/odoo/odoo/pull/111850 closes odoo/odoo#122251 X-original-commit: 4909bdfbb0354310f3e6d21e1ecc7177b74b34bc Signed-off-by: Alexandre Kühn (aku) --- addons/im_livechat/models/discuss_channel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/im_livechat/models/discuss_channel.py b/addons/im_livechat/models/discuss_channel.py index 9b57193d32f..d6adf7c5414 100644 --- a/addons/im_livechat/models/discuss_channel.py +++ b/addons/im_livechat/models/discuss_channel.py @@ -236,4 +236,5 @@ class DiscussChannel(models.Model): return self._chatbot_post_message( chatbot_script, - '
%s
' % _('Restarting conversation...')) + Markup('
%s
') % _('Restarting conversation...'), + )