diff --git a/lib/hk-util.js b/lib/hk-util.js index 860435c86..21ccb4875 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -685,7 +685,7 @@ const handleGetHistory = function (Env, Server, seq, userId, parsed) { // If we're asking for a specific version (lastKnownHash) but we receive an // ENOENT, this is not a pad creation so we need to abort. - if (err && err.code === 'ENOENT' && lastKnownHash) { + if (err && err.code === 'ENOENT' && lastKnownHash) { // XXX && lastKnownHash !== -1 /* This informs clients that the pad they're trying to load was deleted by its owner. The user in question might be reconnecting or might have loaded the document from their cache. diff --git a/www/common/outer/roster.js b/www/common/outer/roster.js index 11024c609..8e8e82dc8 100644 --- a/www/common/outer/roster.js +++ b/www/common/outer/roster.js @@ -503,6 +503,10 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto, Feedback) var channel = config.channel; var lastKnownHash = config.lastKnownHash || -1; + if (config.newTeam) { // XXX + lastKnownHash = undefined; + } + var ref = { state: { members: { }, diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 932e53e9f..9b016c0fe 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -691,10 +691,12 @@ define([ keys: rosterKeys, store: ctx.store, lastKnownHash: void 0, + newTeam: true, Cache: Cache }, waitFor(function (err, _roster) { if (err) { waitFor.abort(); + console.error(err); return void cb({error: 'ROSTER_ERROR'}); } roster = _roster;