[REF] mail: move discuss.channel/transient_message to discuss folder
Part of task-3265211 Part-of: odoo/odoo#128593
This commit is contained in:
@@ -166,16 +166,6 @@ export class Messaging {
|
||||
case "mail.record/insert":
|
||||
this._handleNotificationRecordInsert(notif);
|
||||
break;
|
||||
case "discuss.channel/transient_message": {
|
||||
const channel =
|
||||
this.store.threads[createLocalId("discuss.channel", notif.payload.res_id)];
|
||||
const message = this.messageService.createTransient(
|
||||
Object.assign(notif.payload, { body: markup(notif.payload.body) })
|
||||
);
|
||||
channel.messages.push(message);
|
||||
channel.transientMessages.push(message);
|
||||
break;
|
||||
}
|
||||
case "mail.link.preview/delete":
|
||||
{
|
||||
const { id, message_id } = notif.payload;
|
||||
|
||||
@@ -85,6 +85,15 @@ export class DiscussCoreCommon {
|
||||
this._handleNotificationNewMessage(notif);
|
||||
}
|
||||
});
|
||||
this.busService.subscribe("discuss.channel/transient_message", (payload) => {
|
||||
const channel =
|
||||
this.store.threads[createLocalId("discuss.channel", payload.res_id)];
|
||||
const message = this.messageService.createTransient(
|
||||
Object.assign(payload, { body: markup(payload.body) })
|
||||
);
|
||||
channel.messages.push(message);
|
||||
channel.transientMessages.push(message);
|
||||
});
|
||||
this.busService.start();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user