[FIX] mail: allow message edit when livechat is installed

Livechat override of `_message_update_content` accesses `self` channel
but it was not called with the guest env, leading to access error.

Part-of: odoo/odoo#128290
This commit is contained in:
Sébastien Theys
2023-07-13 08:28:06 +02:00
parent d700cd39b2
commit 89e6beff36
+1 -1
View File
@@ -97,6 +97,6 @@ class ThreadController(http.Controller):
raise NotFound()
if not message_sudo.model or not message_sudo.res_id:
raise NotFound()
request.env[message_sudo.model].browse([message_sudo.res_id])._message_update_content(
guest.env[message_sudo.model].browse([message_sudo.res_id])._message_update_content(
message_sudo, body, attachment_ids=attachment_ids, partner_ids=partner_ids
)