diff options
author | Ev Bogue <ev@evbogue.com> | 2019-12-31 15:58:18 -0600 |
---|---|---|
committer | Ev Bogue <ev@evbogue.com> | 2019-12-31 15:58:18 -0600 |
commit | 9983e7b768f2fc04376e3dfad7335a8a7941dbaa (patch) | |
tree | 52f28e253e79a1ff622af6e27b468a75739504fd /server.js | |
parent | 7b410ab4c605928ce72d9c07f4784954999d9dda (diff) |
refactor gossip v 1.8.0
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -114,11 +114,12 @@ bog.keys().then(key => { wserve.on('connection', function (ws) { ws.on('message', function (message) { var req = JSON.parse(message) + console.log(req) if (req.sendpub) { ws.send(key.publicKey) } else { bog.unbox(req.box, req.requester, key).then(unboxed => { - var unboxedreq = JSON.parse(nacl.util.encodeUTF8(unboxed)) + var unboxedreq = JSON.parse(unboxed) //console.log(unboxedreq) if (unboxedreq.type == 'beacon') { if (unboxedreq.box) { @@ -169,7 +170,7 @@ bog.keys().then(key => { hash: obj.hash, name: config.fullurl, pub: 'ws://' + config.url + ':' + config.wsport + '/~' + key.publicKey, - content: obj.signature, + signature: obj.signature, views: obj.views } } |