From 8ca2ec4363f8bec3fd60e4761ffe5c0363530ad3 Mon Sep 17 00:00:00 2001 From: apoorvapendse Date: Sat, 19 Jul 2025 13:37:42 +0530 Subject: [PATCH] inbox: Use _html naming convention for content rendered as HTML. Signed-off-by: apoorvapendse --- web/src/inbox_ui.ts | 11 +++++++---- web/templates/inbox_view/inbox_row.hbs | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts index e957db6f73..69ea255b49 100644 --- a/web/src/inbox_ui.ts +++ b/web/src/inbox_ui.ts @@ -53,7 +53,7 @@ import * as views_util from "./views_util.ts"; type DirectMessageContext = { conversation_key: string; is_direct: boolean; - rendered_dm_with: string; + rendered_dm_with_html: string; is_group: boolean; user_circle_class: string | false | undefined; is_bot: boolean; @@ -70,7 +70,7 @@ type DirectMessageContext = { const direct_message_context_properties: (keyof DirectMessageContext)[] = [ "conversation_key", "is_direct", - "rendered_dm_with", + "rendered_dm_with_html", "is_group", "user_circle_class", "is_bot", @@ -469,7 +469,7 @@ function format_dm( const reply_to = people.user_ids_string_to_emails_string(user_ids_string); assert(reply_to !== undefined); - const rendered_dm_with = recipient_ids + const rendered_dm_with_html = recipient_ids .map((recipient_id) => ({ name: people.get_display_full_name(recipient_id), status_emoji_info: user_status.get_status_emoji(recipient_id), @@ -492,7 +492,10 @@ function format_dm( const context = { conversation_key: user_ids_string, is_direct: true, - rendered_dm_with: util.format_array_as_list_with_conjunction(rendered_dm_with, "long"), + rendered_dm_with_html: util.format_array_as_list_with_conjunction( + rendered_dm_with_html, + "long", + ), is_group: recipient_ids.length > 1, user_circle_class, is_bot, diff --git a/web/templates/inbox_view/inbox_row.hbs b/web/templates/inbox_view/inbox_row.hbs index a09771b108..421f33864a 100644 --- a/web/templates/inbox_view/inbox_row.hbs +++ b/web/templates/inbox_view/inbox_row.hbs @@ -15,7 +15,7 @@ {{else}} {{/if}} - {{{rendered_dm_with}}} + {{{rendered_dm_with_html}}}