[FIX] im_livechat: fix livechat service thread getter
The livechat service thread getter relies on the thread type to find the current livechat thread. Since guest could have many channels it is incomplete, the id should also be checked. This PR fixes this issue. closes odoo/odoo#135378 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -257,7 +257,9 @@ export class LivechatService {
|
||||
* @returns {import("@mail/core/common/thread_model").Thread|undefined}
|
||||
*/
|
||||
get thread() {
|
||||
return Object.values(this.store.Thread.records).find(({ type }) => type === "livechat");
|
||||
return Object.values(this.store.Thread.records).find(
|
||||
({ id, type }) => type === "livechat" && id === this.sessionCookie?.id
|
||||
);
|
||||
}
|
||||
|
||||
get visitorUid() {
|
||||
|
||||
Reference in New Issue
Block a user