[FIX] mail: prevent crash when using channel palette before init
`joinChannel` expects messaging to be initialized (in particular to access store user) but doesn't actually wait for it. Part-of: odoo/odoo#144580
This commit is contained in:
@@ -535,6 +535,7 @@ export class ThreadService {
|
||||
}
|
||||
|
||||
async joinChannel(id, name) {
|
||||
await this.env.services["mail.messaging"].isReady;
|
||||
await this.orm.call("discuss.channel", "add_members", [[id]], {
|
||||
partner_ids: [this.store.user.id],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user