Skip to content

Commit

Permalink
[FIX] im_livechat: fix history command
Browse files Browse the repository at this point in the history
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#135254

Signed-off-by: Didier Debondt (did) <[email protected]>
  • Loading branch information
tsm-odoo committed Sep 13, 2023
1 parent b512d5f commit 4775fed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/im_livechat/models/discuss_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _execute_command_help_message_extra(self):
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')
Expand Down

0 comments on commit 4775fed

Please sign in to comment.