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.

unmute_topic_banner: Fix 'unmute topic' button for empty string topic.

Prakhar Pratyush08b1ec7b5593
diff --git a/web/src/compose_notifications.ts b/web/src/compose_notifications.ts
index a22c23f8a7f..bafa7c1e879 100644
--- a/web/src/compose_notifications.ts
+++ b/web/src/compose_notifications.ts
@@ -27,6 +27,7 @@ export function notify_unmute(muted_narrow: string, stream_id: number, topic_nam
muted_narrow,
stream_id,
topic_name,
+ is_empty_string_topic: topic_name === "",
classname: compose_banner.CLASSNAMES.unmute_topic_notification,
banner_type: "",
button_text: $t({defaultMessage: "Unmute topic"}),
diff --git a/web/templates/compose_banner/compose_banner.hbs b/web/templates/compose_banner/compose_banner.hbs
index 91458729ad5..6ea29710609 100644
--- a/web/templates/compose_banner/compose_banner.hbs
+++ b/web/templates/compose_banner/compose_banner.hbs
@@ -2,7 +2,7 @@
class="main-view-banner {{banner_type}} {{classname}}"
{{#if user_id}}data-user-id="{{user_id}}"{{/if}}
{{#if stream_id}}data-stream-id="{{stream_id}}"{{/if}}
- {{#if topic_name}}data-topic-name="{{topic_name}}"{{/if}}>
+ {{#if (or topic_name is_empty_string_topic)}}data-topic-name="{{topic_name}}"{{/if}}>
<div class="main-view-banner-elements-wrapper">
{{#if banner_text}}
<p class="banner_content">{{banner_text}}</p>