[FIX] im_livechat: show message history

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) <aku@odoo.com>
This commit is contained in:
Alexandre Kühn
2019-09-17 09:34:32 +00:00
committed by David Beguin
parent aa791a646b
commit b2247ab72f
@@ -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;