mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 00:18:12 +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.
|
// We only test via muted topics for now.
|
||||||
// TODO: Make muted streams and test them.
|
// TODO: Make muted streams and test them.
|
||||||
false,
|
false,
|
||||||
|
id_is_subscribed: () => true,
|
||||||
});
|
});
|
||||||
|
|
||||||
let id = 0;
|
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) {
|
exports.filters_should_hide_topic = function (topic_data) {
|
||||||
const msg = message_store.get(topic_data.last_msg_id);
|
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) {
|
if (sub === undefined || !sub.subscribed) {
|
||||||
// Never try to process deactivated streams.
|
// Never try to process deactivated & unsubscribed stream msgs.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user