mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
recent_topics: Don't show topics from unsubscribed streams.
This commit is contained in:
@@ -168,6 +168,7 @@ set_global("stream_data", {
|
||||
// We only test via muted topics for now.
|
||||
// TODO: Make muted streams and test them.
|
||||
false,
|
||||
id_is_subscribed: () => true,
|
||||
});
|
||||
|
||||
let id = 0;
|
||||
|
||||
@@ -264,9 +264,10 @@ exports.update_topics_of_deleted_message_ids = function (message_ids) {
|
||||
|
||||
exports.filters_should_hide_topic = function (topic_data) {
|
||||
const msg = message_store.get(topic_data.last_msg_id);
|
||||
const sub = stream_data.get_sub_by_id(msg.stream_id);
|
||||
|
||||
if (stream_data.get_sub_by_id(msg.stream_id) === undefined) {
|
||||
// Never try to process deactivated streams.
|
||||
if (sub === undefined || !sub.subscribed) {
|
||||
// Never try to process deactivated & unsubscribed stream msgs.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user