[REF] mail: move discuss.channel.member/fetched to discuss folder

Part of task-3265211

Part-of: odoo/odoo#128593
This commit is contained in:
Sébastien Theys
2023-07-17 18:13:39 +02:00
parent d4399cef37
commit ba5cbd21e7
2 changed files with 12 additions and 14 deletions
@@ -276,20 +276,6 @@ export class Messaging {
}
break;
}
case "discuss.channel.member/fetched": {
const { channel_id, last_message_id, partner_id } = notif.payload;
const channel =
this.store.threads[createLocalId("discuss.channel", channel_id)];
if (channel) {
const seenInfo = channel.seenInfos.find(
(seenInfo) => seenInfo.partner.id === partner_id
);
if (seenInfo) {
seenInfo.lastFetchedMessage = { id: last_message_id };
}
}
break;
}
case "discuss.channel/unpin": {
const thread =
this.store.threads[createLocalId("discuss.channel", notif.payload.id)];
@@ -94,6 +94,18 @@ export class DiscussCoreCommon {
channel.messages.push(message);
channel.transientMessages.push(message);
});
this.busService.subscribe("discuss.channel.member/fetched", (payload) => {
const { channel_id, last_message_id, partner_id } = payload;
const channel = this.store.threads[createLocalId("discuss.channel", channel_id)];
if (channel) {
const seenInfo = channel.seenInfos.find(
(seenInfo) => seenInfo.partner.id === partner_id
);
if (seenInfo) {
seenInfo.lastFetchedMessage = { id: last_message_id };
}
}
});
this.busService.subscribe("discuss.channel.member/seen", (payload) => {
const { channel_id, last_message_id, partner_id } = payload;
const channel = this.store.threads[createLocalId("discuss.channel", channel_id)];