[FIX] im_livechat: use the currentPartnerId from livechat

Current code can't work since session doesn't contain partner_id.

task-3010650

closes odoo/odoo#102952

X-original-commit: dcf9aa612e76ea71429725e12a819678c09cf449
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Didier (did)
2022-10-10 19:03:25 +02:00
parent 4c51ab0048
commit 190f4bf416
@@ -260,7 +260,7 @@ const PublicLivechatMessage = Class.extend({
* @return {boolean}
*/
_isMyselfAuthor() {
return this.hasAuthor() && (this.getAuthorID() === session.partner_id);
return this.hasAuthor() && (this.getAuthorID() === this.messaging.publicLivechatGlobal.options.current_partner_id);
},
});