mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
muting: Use stream_id for internal data structures.
This fixes the most core data structures inside of muting.js. We still use stream names for incoming data to set_muted_topics and outgoing data from get_muted_topics. This will make us more resilient to stream name changes. Before, if you were logged on when a stream rename occured, topics that were muted under that stream would appear to be unmuted. (You could fix it with a reload, but it can be jarring to have a bunch of unread messages appear in your feed suddenly.) Fixes #11033
This commit is contained in:
@@ -446,7 +446,7 @@ exports.message_is_notifiable = function (message) {
|
||||
}
|
||||
|
||||
if (message.type === "stream" &&
|
||||
muting.is_topic_muted(message.stream, message.subject)) {
|
||||
muting.is_topic_muted(message.stream_id, message.subject)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ exports.get_local_notify_mix_reason = function (message) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.type === "stream" && muting.is_topic_muted(message.stream, message.subject)) {
|
||||
if (message.type === "stream" && muting.is_topic_muted(message.stream_id, message.subject)) {
|
||||
return "Sent! Your message was sent to a topic you have muted.";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user