mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
message-list-view: Use specific header for DM conversation with self.
For the DM conversation with the current user, use "Messages with yourself" for the message header bar and tooltip. Fixes #33321. Co-authored-by: Lauryn Menard <lauryn@zulip.com>
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
@@ -88,17 +88,21 @@
|
||||
<div class="message-header-contents">
|
||||
<a class="message_label_clickable narrows_by_recipient stream_label tippy-narrow-tooltip"
|
||||
href="{{pm_with_url}}"
|
||||
data-tippy-content="{{t 'Go to direct messages with {display_reply_to_for_tooltip}' }}">
|
||||
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}}">
|
||||
<span class="private_message_header_icon"><i class="zulip-icon zulip-icon-user"></i></span>
|
||||
<span class="private_message_header_name">
|
||||
{{~#tr}}You and <z-user-names></z-user-names>
|
||||
{{#*inline "z-user-names"}}
|
||||
{{#each recipient_users}}
|
||||
{{~full_name}}{{#if is_bot}}<i class="zulip-icon zulip-icon-bot" aria-label="{{t 'Bot' }}"></i>{{/if}}
|
||||
{{~#if should_add_guest_user_indicator}} <i>({{t 'guest'}})</i>{{/if}}{{#unless @last}}, {{/unless~}}
|
||||
{{/each}}
|
||||
{{/inline}}
|
||||
{{/tr~}}
|
||||
{{#if is_dm_with_self}}
|
||||
{{t 'Messages with yourself' }}
|
||||
{{else}}
|
||||
{{~#tr}}You and <z-user-names></z-user-names>
|
||||
{{#*inline "z-user-names"}}
|
||||
{{#each recipient_users}}
|
||||
{{~full_name}}{{#if is_bot}}<i class="zulip-icon zulip-icon-bot" aria-label="{{t 'Bot' }}"></i>{{/if~}}
|
||||
{{#if should_add_guest_user_indicator}} <i>({{t 'guest'}})</i>{{/if}}{{#unless @last}}, {{/unless}}
|
||||
{{/each}}
|
||||
{{/inline}}
|
||||
{{/tr~}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</a>
|
||||
<span class="recipient_row_date {{#if (and (not always_display_date) date_unchanged )}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span>
|
||||
|
Reference in New Issue
Block a user