[FIX] mail: fix race condition in mail tour
If the check for messaging happens after switching from channel to starred (where there is no composer) it would crash when using `this`. closes odoo/odoo#104392 X-original-commit: d3091762cc5769ed13b5a828769bcd03f440a8f8 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -573,8 +573,8 @@ registerModel({
|
||||
const message = messaging.models['Message'].insert(
|
||||
messaging.models['Message'].convertData(messageData)
|
||||
);
|
||||
if (this.messaging.hasLinkPreviewFeature && !message.isBodyEmpty) {
|
||||
this.messaging.rpc({
|
||||
if (messaging.hasLinkPreviewFeature && !message.isBodyEmpty) {
|
||||
messaging.rpc({
|
||||
route: `/mail/link_preview`,
|
||||
params: {
|
||||
message_id: message.id
|
||||
|
||||
Reference in New Issue
Block a user