don't send DUPLICATE error

pull/1/head
ansuz 4 years ago
parent 840a52240e
commit 15d6f573e7

@ -686,7 +686,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) { // XXX && lastKnownHash !== -1
if (err && err.code === 'ENOENT' && lastKnownHash) {
/*
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.
@ -918,8 +918,9 @@ HK.onChannelMessage = function (Env, Server, channel, msgStruct, cb) {
// more straightforward and reliable.
if (Array.isArray(id) && id[2] && id[2] === channel.lastSavedCp) {
// Reject duplicate checkpoints
// XXX not an error? the checkpoint is already here so we can assume it's stored
return void cb('DUPLICATE');
return void cb();
// not an error? the checkpoint is already here so we can assume it's stored
//return void cb('DUPLICATE');
}
}

Loading…
Cancel
Save