From b2247ab72ffaea247a1dce3bf85cba3296e78c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Mon, 16 Sep 2019 10:04:52 +0000 Subject: [PATCH] [FIX] im_livechat: show message history MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revision on https://github.com/odoo/odoo/commit/923fb7aa05f0e9e0e67440073993ec36bb0f5f53 Commit above fixed an issue since v11.0 that display duplicated messages on a website livechat window. Forward-ported broke the livechat in v12.0 due to refactoring of mail https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c This commit correctly adapts fix for v12.0+. opw-2070911 closes odoo/odoo#36921 Signed-off-by: Alexandre Kühn (aku) --- addons/im_livechat/static/src/js/im_livechat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/im_livechat/static/src/js/im_livechat.js b/addons/im_livechat/static/src/js/im_livechat.js index 5a893f2499a..f3ad30c1390 100644 --- a/addons/im_livechat/static/src/js/im_livechat.js +++ b/addons/im_livechat/static/src/js/im_livechat.js @@ -125,7 +125,7 @@ var LivechatButton = Widget.extend({ var message = new WebsiteLivechatMessage(this, data, options); var hasAlreadyMessage = _.some(this._messages, function (msg) { - return message.id === msg.id; + return message.getID() === msg.getID(); }); if (hasAlreadyMessage) { return;