[FIX] mail: don't redirect to user's own partner form view
Clicking on the author of a message opens a DM with the corresponding user if there is one, and opens the corresponding partner's form view otherwise. When the author is the current user, obviously we don't want to open a DM with ourself, but we probably don't want to open our partner form view either, which was exactly the behavior before this rev.
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
t-att-src="message.avatar_src"
|
||||
data-oe-model="res.partner"
|
||||
t-att-data-oe-id="message.author_id[0]"
|
||||
class="o_thread_message_avatar o_mail_redirect"/>
|
||||
t-attf-class="o_thread_message_avatar #{message.author_redirect ? 'o_mail_redirect' : ''}"/>
|
||||
</t>
|
||||
<t t-if="message.mailto || !message.author_id[0]">
|
||||
<img t-if="message.avatar_src && message.display_author"
|
||||
@@ -80,7 +80,7 @@
|
||||
</strong>
|
||||
<strong t-if="!message.mailto && message.author_id[0]"
|
||||
data-oe-model="res.partner" t-att-data-oe-id="message.author_id[0]"
|
||||
class="o_mail_redirect">
|
||||
t-attf-class="#{message.author_redirect ? 'o_mail_redirect' : ''}">
|
||||
<t t-esc="message.displayed_author"/>
|
||||
</strong>
|
||||
<strong t-if="!message.mailto && !message.author_id[0]">
|
||||
|
||||
Reference in New Issue
Block a user