From b8f0ccf6edc93df329a9ced68034329ef7668909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Fri, 26 Aug 2022 13:38:44 +0000 Subject: [PATCH] [FIX] im_livechat: properly display operator avatar in posted message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, avatar of operator was not displayed properly. This is due to src of avatar being wrongly computed: the serverUrl data is in `PublicLivechatGlobal`, not in `LivechatButtonView`. Because of this, the src was prefixed with `undefined/` instead of the server url, hence no displaying the avatar of operator. This commit fixes issue by getting actual `serverUrl` in correct model `PublicLivechatGlobal`. closes odoo/odoo#99022 Signed-off-by: Sébastien Theys (seb) --- .../static/src/legacy/models/public_livechat_message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/im_livechat/static/src/legacy/models/public_livechat_message.js b/addons/im_livechat/static/src/legacy/models/public_livechat_message.js index 40403ee7f20..05f0199815d 100644 --- a/addons/im_livechat/static/src/legacy/models/public_livechat_message.js +++ b/addons/im_livechat/static/src/legacy/models/public_livechat_message.js @@ -41,7 +41,7 @@ const PublicLivechatMessage = Class.extend({ this._type = data.message_type || undefined; this._defaultUsername = this.messaging.publicLivechatGlobal.options.default_username; - this._serverURL = this.messaging.publicLivechatGlobal.livechatButtonView.serverUrl; + this._serverURL = this.messaging.publicLivechatGlobal.serverUrl; if (parent.messaging.publicLivechatGlobal.livechatButtonView.isChatbot) { this._chatbotStepId = data.chatbot_script_step_id;