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.

compose_banner: Remove the warning for messages in FOLLOWED topics.

Prakhar Pratyush59cf30505302
diff --git a/web/src/notifications.js b/web/src/notifications.js
index e8de1a58ee1..5488ffcb33f 100644
--- a/web/src/notifications.js
+++ b/web/src/notifications.js
@@ -583,7 +583,7 @@ export function get_muted_narrow(message) {
if (
message.type === "stream" &&
stream_data.is_muted(message.stream_id) &&
- !user_topics.is_topic_unmuted(message.stream_id, message.topic)
+ !user_topics.is_topic_unmuted_or_followed(message.stream_id, message.topic)
) {
return "stream";
}
diff --git a/web/src/user_topics.js b/web/src/user_topics.js
index 3b451d38859..867173bf267 100644
--- a/web/src/user_topics.js
+++ b/web/src/user_topics.js
@@ -63,6 +63,10 @@ export function is_topic_muted(stream_id, topic) {
return get_topic_visibility_policy(stream_id, topic) === all_visibility_policies.MUTED;
}
+export function is_topic_unmuted_or_followed(stream_id, topic) {
+ return is_topic_unmuted(stream_id, topic) || is_topic_followed(stream_id, topic);
+}
+
export function get_user_topics_for_visibility_policy(visibility_policy) {
const topics = [];
for (const [stream_id, sub_dict] of all_user_topics) {