Update roster checkpoints hash

This commit is contained in:
yflory 2019-09-23 11:04:05 +02:00
parent 1a9229e0ec
commit 9e7dfed98b

View file

@ -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();