diff options
-rw-r--r-- | gossip.js | 3 | ||||
-rw-r--r-- | server.js | 6 |
2 files changed, 2 insertions, 7 deletions
@@ -85,10 +85,9 @@ function sync (subs, keys) { localforage.getItem(msg.author).then(feed => { open(feed[0]).then(lastmsg => { if (unboxedreq.length + lastmsg.seq === msg.seq) { - console.log('combinable feeds') var newlog = unboxedreq.concat(feed) localforage.setItem(msg.author, newlog).then(success => { - console.log('combined existing feed with diff and saved to client') + console.log('combined existing feed of ' + msg.author + ' with diff and saved to client') }) localforage.getItem('log').then(log => { if (!log) { @@ -106,16 +106,12 @@ bog.keys().then(key => { }) } if (msg.seq > unboxedreq.length) { fs.readFile(__dirname + '/bogs/' + msg.author, 'UTF-8', function (err, data) { - console.log('read existing feed from disk') var feed = JSON.parse(data) bog.open(feed[0]).then(lastmsg => { - console.log(msg.seq) - console.log(lastmsg.seq) if (unboxedreq.length + lastmsg.seq === msg.seq) { - console.log('combinable feeds') var newlog = unboxedreq.concat(feed) fs.writeFile(__dirname + '/bogs/' + msg.author, JSON.stringify(newlog), 'UTF-8', function (err, success) { - console.log('combined existing feed with diff and saved to server') + console.log('combined existing feed of ' + msg.author + ' with diff and saved to server') }) } }) |