mirror of https://github.com/zulip/zulip.git
stream_data: Make `Subscribe` button not visible for archived streams.
This commit is contained in:
parent
a917215292
commit
616e39c290
|
@ -481,11 +481,9 @@ export function can_toggle_subscription(sub: StreamSubscription): boolean {
|
|||
// Spectators cannot subscribe to any streams.
|
||||
//
|
||||
// Note that the correctness of this logic relies on the fact that
|
||||
// one cannot be subscribed to a deactivated stream, and
|
||||
// deactivated streams are automatically made private during the
|
||||
// archive stream process.
|
||||
// one cannot be subscribed to a deactivated stream.
|
||||
return (
|
||||
(sub.subscribed || (!current_user.is_guest && !sub.invite_only)) &&
|
||||
(sub.subscribed || (!current_user.is_guest && !(sub.invite_only || sub.is_archived))) &&
|
||||
!page_params.is_spectator
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue