From 4775fedddf72408ae3ee63bb75e994520b7f0367 Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Wed, 13 Sep 2023 08:32:08 +0200 Subject: [PATCH] [FIX] im_livechat: fix history command Before this commit, executing the `/history` command in a livechat would do nothing. Indeed, the message was sent on the wrong target through the bus so the history request was never received by the visitor client. This commit fixes the issue by sending the notification on the channel instead of the channel uuid. closes odoo/odoo#135254 Signed-off-by: Didier Debondt (did) --- addons/im_livechat/models/discuss_channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/im_livechat/models/discuss_channel.py b/addons/im_livechat/models/discuss_channel.py index e7c789728ec..31e7c6d6584 100644 --- a/addons/im_livechat/models/discuss_channel.py +++ b/addons/im_livechat/models/discuss_channel.py @@ -85,7 +85,7 @@ class DiscussChannel(models.Model): return msg def execute_command_history(self, **kwargs): - self.env['bus.bus']._sendone(self.uuid, 'im_livechat.history_command', {'id': self.id}) + self.env['bus.bus']._sendone(self, 'im_livechat.history_command', {'id': self.id}) def _send_history_message(self, pid, page_history): message_body = _('No history found')