diff options
author | Ev Bogue <ev@evbogue.com> | 2020-01-10 13:52:42 -0600 |
---|---|---|
committer | Ev Bogue <ev@evbogue.com> | 2020-01-10 13:52:42 -0600 |
commit | 5f47d7c1ca5e5baed3180c125844803804a8a7a1 (patch) | |
tree | e49b9e84f3cd26e8bb2e3b553fccbb4fd03617b5 | |
parent | df5dd87b165d3496e808b5ab443ed5f919f3e88c (diff) |
remove console.logs
-rw-r--r-- | gossip.js | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -1,15 +1,11 @@ function processreq (req, pubkey, connection, keys) { - console.log('processreq') if (req.seq === 0 || req.seq) { bog(req.author).then(feed => { if (feed) { - console.log('opening first message') open(feed[0]).then(msg => { - console.log(msg) if (req.seq > msg.seq) { var reqdiff = JSON.stringify({author: req.author, seq: msg.seq}) box(reqdiff, pubkey, keys).then(boxed => { - console.log(boxed) connection.send(JSON.stringify({ requester: keys.publicKey, box: boxed @@ -29,7 +25,6 @@ function processreq (req, pubkey, connection, keys) { baserange) ) box(diff, pubkey, keys).then(boxed => { - console.log(boxed) connection.send(JSON.stringify({ requester: keys.publicKey, box: boxed @@ -65,7 +60,6 @@ function processreq (req, pubkey, connection, keys) { } if (feed) { open(feed[0]).then(lastmsg => { - console.log(lastmsg) if (req.length + lastmsg.seq === msg.seq) { var newlog = req.concat(feed) localforage.setItem(msg.author, newlog) @@ -94,7 +88,6 @@ function processreq (req, pubkey, connection, keys) { } function getpubkey (connection, keys) { - console.log('asking for pubkey') connection.onopen = () => { connection.send(JSON.stringify({ requester: keys.publicKey, sendpub: true @@ -102,24 +95,18 @@ function getpubkey (connection, keys) { } connection.onmessage = (m) => { - console.log(m) localforage.setItem(m.origin, m.data) } } function getfeed (feed, pubkey, connection, keys) { - console.log('getfeed') bog(feed).then(log => { var logseq = 0 connection.onopen = () => { if (log) { - console.log('onopen') - console.log(log[0]) - // for some reason this does not open below open(log[0]).then(msg => { var string = JSON.stringify(msg) box(string, pubkey, keys).then(boxed => { - console.log(boxed) connection.send(JSON.stringify({ requester: keys.publicKey, box: boxed @@ -128,7 +115,6 @@ function getfeed (feed, pubkey, connection, keys) { logseq = msg.seq }) } else { - console.log('else') var msg = { author: feed, seq: logseq @@ -142,7 +128,6 @@ function getfeed (feed, pubkey, connection, keys) { } } connection.onmessage = (m) => { - console.log('onmessage') var req = JSON.parse(m.data) unbox(req.box, req.requester, keys).then(unboxed => { var unboxedreq = JSON.parse(unboxed) @@ -161,17 +146,13 @@ function sync (feeds, keys) { } pubs.forEach(function (pub, index) { setTimeout(function () { - console.log(pub) var connection = new WebSocket(pub) localforage.getItem(pub).then(pubkey => { if (!pubkey) { getpubkey(connection, keys) } if (pubkey) { - console.log(pubkey) - console.log(feeds) feeds.forEach(feed => { - console.log('getting ' + feed) getfeed(feed, pubkey, connection, keys) }) } |