[IMP] mail, im_livechat: remove public check for anonymous sending
task-2841797 closes odoo/odoo#90424 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
# ------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user