From 97ef347724500e4bd9517f3632ad22fd2ac6784c Mon Sep 17 00:00:00 2001 From: Zelong Lin Date: Tue, 3 May 2022 14:38:53 +0000 Subject: [PATCH] [IMP] mail, im_livechat: remove public check for anonymous sending MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit task-2841797 closes odoo/odoo#90424 Signed-off-by: Sébastien Theys (seb) --- addons/im_livechat/models/mail_channel.py | 4 ++-- addons/mail/models/mail_channel.py | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/im_livechat/models/mail_channel.py b/addons/im_livechat/models/mail_channel.py index 571e646499d..2bd04db9697 100644 --- a/addons/im_livechat/models/mail_channel.py +++ b/addons/im_livechat/models/mail_channel.py @@ -41,8 +41,8 @@ class MailChannel(models.Model): """ notifications = super()._channel_message_notifications(message=message, message_format=message_format) for channel in self: - # add uuid for private livechat channels to allow anonymous to listen - if channel.channel_type == 'livechat' and channel.public == 'private': + # add uuid to allow anonymous to listen + if channel.channel_type == 'livechat': notifications.append([channel.uuid, 'mail.channel/new_message', notifications[0][2]]) if not message.author_id: unpinned_channel_partner = self.channel_last_seen_partner_ids.filtered(lambda cp: not cp.is_pinned) diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index 702b1b756fa..47955f69515 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -767,9 +767,6 @@ class Channel(models.Model): 'message': dict(message_format), } notifications.append((channel, 'mail.channel/new_message', payload)) - # add uuid to allow anonymous to listen - if channel.public == 'public': - notifications.append((channel.uuid, 'mail.channel/new_message', payload)) return notifications # ------------------------------------------------------------