presence: Suppress some unnecessary blueslip errors for presence.

There was previously a race condition where reload.is_in_progress was
set after `activity.js` sent the presence request to the server, but
before we process the response; in that race condition, we still
shouldn't send blueslip errors to the server.
This commit is contained in:
Tim Abbott
2018-07-30 22:17:46 -07:00
parent 57ed871800
commit f71316edd0
2 changed files with 6 additions and 1 deletions

View File

@@ -104,7 +104,7 @@ exports.set_info = function (presences, server_timestamp) {
if (!people.is_current_user(this_email)) {
var person = people.get_by_email(this_email);
if (person === undefined) {
if (!server_events.suspect_offline) {
if (!(server_events.suspect_offline || reload.is_in_progress())) {
// If we're online, and we get a user who we don't
// know about in the presence data, throw an error.
blueslip.error('Unknown email in presence data: ' + this_email);