[FIX] mail: prevent session expired with channel_info for guest

closes odoo/odoo#77561

X-original-commit: e1c68fa4e3dbbdedce45a86f404ded2350c7b46c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
Sébastien Theys
2021-09-30 18:28:00 +00:00
parent e3af8aee68
commit 872227e076
@@ -278,6 +278,9 @@ function factory(dependencies) {
id: channelId,
model: 'mail.channel',
});
if (!channel && this.messaging.isCurrentUserGuest) {
return; // guests should not receive messages for channels they don't know, and they can't make the channel_info RPC
}
const wasChannelExisting = !!channel;
const convertedData = this.messaging.models['mail.message'].convertData(messageData);