mirror of https://github.com/zulip/zulip.git
get_invite_stream_data: Do not display archived channels.
User should not be able to sent invite for archived channels.
This commit is contained in:
parent
dbc90ba2e5
commit
e8bb9e2de1
|
@ -378,7 +378,7 @@ export function get_invite_stream_data(): StreamSubscription[] {
|
|||
const streams = [];
|
||||
const all_subs = get_unsorted_subs();
|
||||
for (const sub of all_subs) {
|
||||
if (can_subscribe_others(sub)) {
|
||||
if (!sub.is_archived && can_subscribe_others(sub)) {
|
||||
streams.push(sub);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,7 +134,10 @@ export function typeahead_source(
|
|||
const potential_streams = invite_streams
|
||||
? stream_data.get_invite_stream_data()
|
||||
: stream_data.get_unsorted_subs();
|
||||
return filter_taken_streams(potential_streams, pill_widget).map((stream) => ({
|
||||
|
||||
const active_streams = potential_streams.filter((sub) => !sub.is_archived);
|
||||
|
||||
return filter_taken_streams(active_streams, pill_widget).map((stream) => ({
|
||||
...stream,
|
||||
type: "stream",
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue