recent_view: Use _html naming convention for content rendered as HTML.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
This commit is contained in:
apoorvapendse
2025-07-19 13:55:58 +05:30
committed by Tim Abbott
parent 03a2d9f644
commit ceb9367bc4
2 changed files with 8 additions and 4 deletions

View File

@@ -614,7 +614,7 @@ type ConversationContext = {
| {
is_private: true;
user_ids_string: string;
rendered_pm_with: string;
rendered_pm_with_html: string;
recipient_id: number;
pm_url: string;
is_group: boolean;
@@ -713,7 +713,7 @@ function format_conversation(conversation_data: ConversationData): ConversationC
// Direct message info
const user_ids_string = last_msg.to_user_ids;
assert(typeof last_msg.display_recipient !== "string");
const rendered_pm_with = last_msg.display_recipient
const rendered_pm_with_html = last_msg.display_recipient
.filter(
(recipient: DisplayRecipientUser) =>
!people.is_my_user_id(recipient.id) || last_msg.display_recipient.length === 1,
@@ -759,7 +759,11 @@ function format_conversation(conversation_data: ConversationData): ConversationC
dm_context = {
user_ids_string,
rendered_pm_with: util.format_array_as_list(rendered_pm_with, "long", "conjunction"),
rendered_pm_with_html: util.format_array_as_list(
rendered_pm_with_html,
"long",
"conjunction",
),
recipient_id,
pm_url,
is_group,

View File

@@ -32,7 +32,7 @@
<div class="flex_container">
<div class="left_part recent_view_focusable line_clamp" data-col-index="{{ column_indexes.topic }}">
{{#if is_private}}
<a href="{{pm_url}}" class="recent-view-table-link {{#if is_group}}recent-view-dm-group{{else}}recent-view-dm{{/if}}">{{{rendered_pm_with}}}</a>
<a href="{{pm_url}}" class="recent-view-table-link {{#if is_group}}recent-view-dm-group{{else}}recent-view-dm{{/if}}">{{{rendered_pm_with_html}}}</a>
{{else}}
<a class="white-space-preserve-wrap recent-view-table-link {{#if is_empty_string_topic}}empty-topic-display{{/if}}" href="{{topic_url}}">{{topic_display_name}}</a>
{{/if}}