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.

people: Downgrade late added user errors for spectators.

Tim Abbott3c60e538f9f7
diff --git a/web/src/people.js b/web/src/people.js
index 6d0889f4064..7d77e52d282 100644
--- a/web/src/people.js
+++ b/web/src/people.js
@@ -1269,7 +1269,13 @@ export function deactivate(person) {
}
export function report_late_add(user_id, email) {
- if (reload_state.is_in_progress()) {
+ // If the events system is not running, then it is expected that
+ // we will fetch messages from the server that were sent by users
+ // who don't exist in our users data set. This can happen because
+ // we're in the middle of a reload (and thus stopped our event
+ // queue polling) or because we are a spectator and never had an
+ // event queue in the first place.
+ if (reload_state.is_in_progress() || page_params.is_spectator) {
blueslip.log("Added user late", {user_id, email});
} else {
blueslip.error("Added user late", {user_id, email});
diff --git a/web/src/server_events.js b/web/src/server_events.js
index bfbb59523c8..f7cbb08837a 100644
--- a/web/src/server_events.js
+++ b/web/src/server_events.js
@@ -154,8 +154,8 @@ function get_events({dont_block = false} = {}) {
}
// TODO: In the future, we may implement Tornado support for live
- // update for spectator, but until then, there's nothing
- // to do here.
+ // update for spectators (#20315), but until then, there's nothing
+ // to do here. Update report_late_add if this changes.
if (page_params.is_spectator) {
return;
}