mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 05:58:25 +00:00
default stream: Limit private streams in default stream suggestions.
Admin users can't add private unsubscribed streams to the default streams list. Therefore, we shouldn't include private streams the user is not subscribed to in the default stream suggestions.
This commit is contained in:
committed by
Tim Abbott
parent
6e136be975
commit
ee8948c3e1
@@ -141,7 +141,7 @@ exports.delete_sub = function (stream_id) {
|
||||
exports.get_non_default_stream_names = function () {
|
||||
var subs = stream_info.values();
|
||||
subs = _.reject(subs, function (sub) {
|
||||
return exports.is_default_stream_id(sub.stream_id);
|
||||
return exports.is_default_stream_id(sub.stream_id) || !sub.subscribed && sub.invite_only;
|
||||
});
|
||||
var names = _.pluck(subs, 'name');
|
||||
return names;
|
||||
|
||||
Reference in New Issue
Block a user