diff --git a/web/src/message_list.js b/web/src/message_list.js
index ec9e0b33bd..5a8e2c0f33 100644
--- a/web/src/message_list.js
+++ b/web/src/message_list.js
@@ -326,6 +326,8 @@ export class MessageList {
let just_unsubscribed = false;
const subscribed = stream_data.is_subscribed_by_name(stream_name);
const sub = stream_data.get_sub(stream_name);
+ const invite_only = sub.invite_only;
+ const is_web_public = sub.is_web_public;
const can_toggle_subscription =
sub !== undefined && stream_data.can_toggle_subscription(sub);
if (sub === undefined) {
@@ -333,6 +335,7 @@ export class MessageList {
} else if (!subscribed && !this.last_message_historical) {
just_unsubscribed = true;
}
+
this.view.render_trailing_bookend(
stream_name,
subscribed,
@@ -340,6 +343,8 @@ export class MessageList {
just_unsubscribed,
can_toggle_subscription,
page_params.is_spectator,
+ invite_only,
+ is_web_public,
);
}
diff --git a/web/src/message_list_view.js b/web/src/message_list_view.js
index 90b03e32f2..038e292320 100644
--- a/web/src/message_list_view.js
+++ b/web/src/message_list_view.js
@@ -1379,6 +1379,8 @@ export class MessageListView {
just_unsubscribed,
can_toggle_subscription,
is_spectator,
+ invite_only,
+ is_web_public,
) {
// This is not the only place we render bookends; see also the
// partial in message_group.hbs, which do not set is_trailing_bookend.
@@ -1391,6 +1393,8 @@ export class MessageListView {
just_unsubscribed,
is_spectator,
is_trailing_bookend: true,
+ invite_only,
+ is_web_public,
}),
);
rows.get_table(this.table_name).append($rendered_trailing_bookend);
diff --git a/web/src/stream_settings_ui.js b/web/src/stream_settings_ui.js
index 14a5578c20..61f5aadf3f 100644
--- a/web/src/stream_settings_ui.js
+++ b/web/src/stream_settings_ui.js
@@ -20,6 +20,7 @@ import * as hash_util from "./hash_util";
import {$t, $t_html} from "./i18n";
import * as keydown_util from "./keydown_util";
import * as loading from "./loading";
+import * as message_lists from "./message_lists";
import * as message_live_update from "./message_live_update";
import * as message_view_header from "./message_view_header";
import * as overlays from "./overlays";
@@ -217,6 +218,7 @@ export function update_stream_privacy(slim_sub, values) {
// Update UI elements
update_left_panel_row(sub);
+ message_lists.current.update_trailing_bookend();
stream_ui_updates.update_setting_element(sub, "stream_privacy");
stream_ui_updates.enable_or_disable_permission_settings_in_edit_panel(sub);
stream_ui_updates.update_stream_privacy_icon_in_settings(sub);
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index 46b4da181c..9711503534 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -2441,6 +2441,17 @@ select.invite-as {
.sub-unsub-message .stream-status {
opacity: 0.6;
+
+ & i {
+ font-size: 10px;
+ position: relative;
+ top: 1px;
+ margin-left: 2px;
+ }
+
+ .zulip-icon.zulip-icon-lock {
+ font-size: 12px;
+ }
}
.sub-unsub-message {
diff --git a/web/templates/bookend.hbs b/web/templates/bookend.hbs
index e9660785e0..fc1e390b1c 100644
--- a/web/templates/bookend.hbs
+++ b/web/templates/bookend.hbs
@@ -9,11 +9,20 @@
{{#if deactivated}}
{{t "This stream has been deactivated" }}
{{else if subscribed }}
- {{t "You subscribed to stream {stream_name}" }}
+ {{#tr}}
+ You subscribed to stream {{stream_name}}
+ {{#*inline "z-stream-icon"}}{{> stream_privacy }}{{/inline}}
+ {{/tr}}
{{else if just_unsubscribed }}
- {{t "You unsubscribed from stream {stream_name}" }}
+ {{#tr}}
+ You unsubscribed from stream {{stream_name}}
+ {{#*inline "z-stream-icon"}}{{> stream_privacy }}{{/inline}}
+ {{/tr}}
{{else}}
- {{t "You are not subscribed to stream {stream_name}" }}
+ {{#tr}}
+ You are not subscribed to stream {{stream_name}}
+ {{#*inline "z-stream-icon"}}{{> stream_privacy }}{{/inline}}
+ {{/tr}}
{{/if}}
{{/if}}