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.

recent_topics: Don't restore filters for spectators.

Aman Agrawale6e975b47020
diff --git a/static/js/recent_topics_ui.js b/static/js/recent_topics_ui.js
index 4a041aba5a2..91aff0213a8 100644
--- a/static/js/recent_topics_ui.js
+++ b/static/js/recent_topics_ui.js
@@ -87,7 +87,12 @@ export function save_filters() {
}
export function load_filters() {
- filters = new Set(ls.get(ls_key));
+ if (!page_params.is_spectator) {
+ // A user may have a stored filter and can log out
+ // to see web public view. This ensures no filters are
+ // selected for spectators.
+ filters = new Set(ls.get(ls_key));
+ }
}
export function set_default_focus() {