From 208372d0d219412e6e3fdfb8ca87642a02bff5a6 Mon Sep 17 00:00:00 2001 From: apoorvapendse Date: Sat, 19 Jul 2025 14:44:20 +0530 Subject: [PATCH] recipient_row: Use _html naming convention for content rendered as HTML. Signed-off-by: apoorvapendse --- web/src/message_list_view.ts | 16 ++++++++-------- web/templates/recipient_row.hbs | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/web/src/message_list_view.ts b/web/src/message_list_view.ts index 9836ccd701..f2fa0b938e 100644 --- a/web/src/message_list_view.ts +++ b/web/src/message_list_view.ts @@ -82,7 +82,7 @@ export type MessageContainer = { export type MessageGroup = { bookend_top?: boolean; - date: string; + date_html: string; date_unchanged: boolean; message_containers: MessageContainer[]; message_group_id: string; @@ -96,7 +96,7 @@ export type MessageGroup = { is_topic_editable: boolean; is_web_public: boolean; just_unsubscribed?: boolean; - match_topic: string | undefined; + match_topic_html: string | undefined; recipient_bar_color: string; stream_id: number; stream_name?: string; @@ -364,7 +364,7 @@ function populate_group_from_message( const is_private = message.is_private; const display_recipient = message.display_recipient; const message_group_id = _.uniqueId("message_group_"); - const date = get_group_display_date(message, year_changed); + const date_html = get_group_display_date(message, year_changed); // Each searched message is a self-contained result, // so we always display date in the recipient bar for those messages. @@ -381,7 +381,7 @@ function populate_group_from_message( const topic = message.topic; const topic_display_name = util.get_final_topic_display_name(topic); const is_empty_string_topic = topic === ""; - const match_topic = util.get_match_topic(message); + const match_topic_html = util.get_match_topic(message); const stream_url = hash_util.channel_url_by_user_setting(message.stream_id); const is_archived = stream_data.is_stream_archived(message.stream_id); const topic_url = internal_url.by_stream_topic_url( @@ -420,7 +420,7 @@ function populate_group_from_message( ...get_topic_edit_properties(message), user_can_resolve_topic, ...subscription_markers, - date, + date_html, display_recipient, date_unchanged, topic_links, @@ -431,7 +431,7 @@ function populate_group_from_message( stream_privacy_icon_color, invite_only, is_web_public, - match_topic, + match_topic_html, stream_url, is_archived, topic_url, @@ -454,7 +454,7 @@ function populate_group_from_message( is_stream, is_private, ...get_topic_edit_properties(message), - date, + date_html, date_unchanged, display_recipient, pm_with_url: message.pm_with_url, @@ -2000,7 +2000,7 @@ export class MessageListView { .attr("id")!; const group = this._find_message_group(message_group_id); if (group !== undefined) { - const rendered_date = group.date; + const rendered_date = group.date_html; dom_updates.html_updates.push({ $element: $current_sticky_header.find(".recipient_row_date"), rendered_date, diff --git a/web/templates/recipient_row.hbs b/web/templates/recipient_row.hbs index a819a26ae0..6394ef2fe5 100644 --- a/web/templates/recipient_row.hbs +++ b/web/templates/recipient_row.hbs @@ -29,7 +29,7 @@ href="{{topic_url}}" data-tippy-content="{{t 'Go to #{display_recipient} > {topic_display_name}' }}"> {{#if (and use_match_properties (not is_empty_string_topic))}} - {{{match_topic}}} + {{{match_topic_html}}} {{else}} {{topic_display_name}} {{/if}} @@ -88,7 +88,7 @@ {{> components/icon_button icon="more-vertical" intent="neutral" custom_classes="recipient-bar-control-icon" data-tippy-content=(t "Topic actions") aria-label=(t "Topic actions") }} - {{{date}}} + {{{date_html}}} {{else}} @@ -113,7 +113,7 @@ {{/if}} - {{{date}}} + {{{date_html}}} {{/if}}