[FIX] mail: Improved live chat feature when entering help command
closes odoo/odoo#104877 X-original-commit: 4bf6cd0cc26268442dfc5201eb8b49af98648c49 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
committed by
Sébastien Theys
parent
e774cac767
commit
9f49c5e8e0
@@ -1191,11 +1191,11 @@ class Channel(models.Model):
|
||||
def execute_command_help(self, **kwargs):
|
||||
partner = self.env.user.partner_id
|
||||
if self.channel_type == 'channel':
|
||||
msg = _("You are in channel <b>#%s</b>.", self.name)
|
||||
msg = _("You are in channel <b>#%s</b>.", html_escape(self.name))
|
||||
else:
|
||||
all_channel_members = self.env['mail.channel.member'].with_context(active_test=False)
|
||||
channel_members = all_channel_members.search([('partner_id', '!=', partner.id), ('channel_id', '=', self.id)])
|
||||
msg = _("You are in a private conversation with <b>@%s</b>.", html_escape(channel_members[0].partner_id.name if channel_members else _("Anonymous")))
|
||||
msg = _("You are in a private conversation with <b>@%s</b>.", _(" @").join(html_escape(member.partner_id.name) for member in channel_members) if channel_members else _("Anonymous"))
|
||||
msg += self._execute_command_help_message_extra()
|
||||
|
||||
self._send_transient_message(partner, msg)
|
||||
|
||||
Reference in New Issue
Block a user