[REF] mail: move discuss.channel/legacy_insert to discuss folder
Part of task-3265211 Part-of: odoo/odoo#128593
This commit is contained in:
@@ -166,14 +166,6 @@ export class Messaging {
|
||||
case "mail.record/insert":
|
||||
this._handleNotificationRecordInsert(notif);
|
||||
break;
|
||||
case "discuss.channel/legacy_insert":
|
||||
this.threadService.insert({
|
||||
id: notif.payload.channel.id,
|
||||
model: "discuss.channel",
|
||||
type: notif.payload.channel.channel_type,
|
||||
...notif.payload,
|
||||
});
|
||||
break;
|
||||
case "discuss.channel/transient_message": {
|
||||
const channel =
|
||||
this.store.threads[createLocalId("discuss.channel", notif.payload.res_id)];
|
||||
|
||||
@@ -61,6 +61,14 @@ export class DiscussCoreCommon {
|
||||
{ type: "info" }
|
||||
);
|
||||
});
|
||||
this.busService.subscribe("discuss.channel/legacy_insert", (payload) => {
|
||||
this.threadService.insert({
|
||||
id: payload.channel.id,
|
||||
model: "discuss.channel",
|
||||
type: payload.channel.channel_type,
|
||||
...payload,
|
||||
});
|
||||
});
|
||||
this.busService.addEventListener("notification", ({ detail: notifications }) => {
|
||||
// Do not handle new message notification if the channel was just left. This issue
|
||||
// occurs because the "discuss.channel/leave" and the "discuss.channel/new_message"
|
||||
|
||||
Reference in New Issue
Block a user