Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

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

apoorvapendseceb9367bc478
diff --git a/web/src/recent_view_ui.ts b/web/src/recent_view_ui.ts
index 1574e722f3c..b88001e5f8e 100644
--- a/web/src/recent_view_ui.ts
+++ b/web/src/recent_view_ui.ts
@@ -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,
diff --git a/web/templates/recent_view_row.hbs b/web/templates/recent_view_row.hbs
index 7d3059469a9..4c992fdd6ea 100644
--- a/web/templates/recent_view_row.hbs
+++ b/web/templates/recent_view_row.hbs
@@ -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}}