Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

bookend: Simplify show_button check.

Tim Abbott2b59148e2166
diff --git a/static/js/message_list.js b/static/js/message_list.js
index 01d3d9c635f..95c397ed2a9 100644
--- a/static/js/message_list.js
+++ b/static/js/message_list.js
@@ -253,10 +253,7 @@ export class MessageList {
show_button = false;
} else if (!subscribed && !this.last_message_historical) {
just_unsubscribed = true;
-
- // For invite only streams hide the resubscribe button
- // Hide button for guest users and spectators
- show_button = !page_params.is_guest && !sub.invite_only;
+ show_button = stream_data.can_toggle_subscription(sub);
}
this.view.render_trailing_bookend(
stream_name,