Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stream_data: Make `Subscribe` button not visible for archived streams.
sanchi-t616e39c290f6
diff --git a/web/src/stream_data.ts b/web/src/stream_data.tsindex f6cc3255d06..4e7a26d9588 100644--- a/web/src/stream_data.ts+++ b/web/src/stream_data.ts@@ -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);}