diff --git a/web/src/message_list_view.ts b/web/src/message_list_view.ts index e356396c33..d915739f57 100644 --- a/web/src/message_list_view.ts +++ b/web/src/message_list_view.ts @@ -123,6 +123,7 @@ export type MessageGroup = { pm_with_url: string; recipient_users: RecipientRowUser[]; always_display_date: boolean; + is_dm_with_self: boolean; } ); @@ -458,6 +459,7 @@ function populate_group_from_message( display_recipient, pm_with_url: message.pm_with_url, recipient_users: get_users_for_recipient_row(message), + is_dm_with_self: people.is_direct_message_conversation_with_self(user_ids), display_reply_to_for_tooltip: message_store.get_pm_full_names(user_ids), always_display_date, }; diff --git a/web/templates/recipient_row.hbs b/web/templates/recipient_row.hbs index a6eaa718dd..c7e55f0afc 100644 --- a/web/templates/recipient_row.hbs +++ b/web/templates/recipient_row.hbs @@ -88,17 +88,21 @@
+ data-tippy-content="{{#if is_dm_with_self}}{{t 'Go to direct messages with yourself' }}{{else}}{{t 'Go to direct messages with {display_reply_to_for_tooltip}' }}{{/if}}"> - {{~#tr}}You and - {{#*inline "z-user-names"}} - {{#each recipient_users}} - {{~full_name}}{{#if is_bot}}{{/if}} - {{~#if should_add_guest_user_indicator}} ({{t 'guest'}}){{/if}}{{#unless @last}}, {{/unless~}} - {{/each}} - {{/inline}} - {{/tr~}} + {{#if is_dm_with_self}} + {{t 'Messages with yourself' }} + {{else}} + {{~#tr}}You and + {{#*inline "z-user-names"}} + {{#each recipient_users}} + {{~full_name}}{{#if is_bot}}{{/if~}} + {{#if should_add_guest_user_indicator}} ({{t 'guest'}}){{/if}}{{#unless @last}}, {{/unless}} + {{/each}} + {{/inline}} + {{/tr~}} + {{/if}} {{{date}}}