diff --git a/addons/im_livechat/static/src/models/message_view.js b/addons/im_livechat/static/src/models/message_view.js new file mode 100644 index 00000000000..beacd7071ef --- /dev/null +++ b/addons/im_livechat/static/src/models/message_view.js @@ -0,0 +1,22 @@ +/** @odoo-module **/ + +import { Patch } from '@mail/model'; + +Patch({ + name: "MessageView", + fields: { + hasAuthorClickable: { + compute() { + if ( + this.message && + this.message.originThread && + this.message.originThread.channel && + this.message.originThread.channel.channel_type === "livechat" + ) { + return this.message.author === this.message.originThread.channel.correspondent; + } + return this._super(); + }, + }, + }, +}); diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot index 67be94ccc2c..07fca3a8c52 100644 --- a/addons/mail/i18n/mail.pot +++ b/addons/mail/i18n/mail.pot @@ -6665,6 +6665,13 @@ msgstr "" msgid "Open chat" msgstr "" +#. module: mail +#. odoo-javascript +#: code:addons/mail/static/src/models/message_view.js:0 +#, python-format +msgid "Open profile" +msgstr "" + #. module: mail #. odoo-javascript #: code:addons/mail/static/src/models/call_systray_menu.js:0 diff --git a/addons/mail/static/src/components/message/message.xml b/addons/mail/static/src/components/message/message.xml index e96eef8fa04..bc691942c06 100644 --- a/addons/mail/static/src/components/message/message.xml +++ b/addons/mail/static/src/components/message/message.xml @@ -30,7 +30,7 @@