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.

notifications: Enable desktop notifications for the UNMUTED topic.

Prakhar Pratyushb6aa004334c9
diff --git a/web/src/notifications.js b/web/src/notifications.js
index 6e71c7725f9..49a5bc798da 100644
--- a/web/src/notifications.js
+++ b/web/src/notifications.js
@@ -401,9 +401,12 @@ export function message_is_notifiable(message) {
return true;
}
- // Messages to muted streams that don't mention us specifically
- // are not notifiable.
- if (message.type === "stream" && stream_data.is_muted(message.stream_id)) {
+ // Messages to unmuted topics in muted streams may generate desktop notifications.
+ if (
+ message.type === "stream" &&
+ stream_data.is_muted(message.stream_id) &&
+ !user_topics.is_topic_unmuted(message.stream_id, message.topic)
+ ) {
return false;
}