From 9e7dfed98bd5c223cfba1664d2ad197f2db0862c Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 23 Sep 2019 11:04:05 +0200 Subject: [PATCH] Update roster checkpoints hash --- www/common/outer/team.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 9d169152a..9ffcae1fa 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -155,6 +155,10 @@ define([ ctx.updateMetadata(); ctx.emit('ROSTER_CHANGE', id, team.clients); }); + roster.on('checkpoint', function (hash) { + var rosterData = Util.find(ctx, ['store', 'proxy', 'teams', id, 'keys', 'roster']); + rosterData.lastKnownHash = hash; + }); team.sendEvent = function (q, data, sender) { @@ -327,6 +331,8 @@ define([ } roster = _roster; + // XXX update our roster last known hash if a checkpoint was sent in the history + // If we've been kicked, don't try to update our data, we'll close everything // in the next nThen part var state = roster.getState();