aboutsummaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorEv Bogue <ev@evbogue.com>2019-12-31 15:58:18 -0600
committerEv Bogue <ev@evbogue.com>2019-12-31 15:58:18 -0600
commit9983e7b768f2fc04376e3dfad7335a8a7941dbaa (patch)
tree52f28e253e79a1ff622af6e27b468a75739504fd /server.js
parent7b410ab4c605928ce72d9c07f4784954999d9dda (diff)
refactor gossip v 1.8.0
Diffstat (limited to 'server.js')
-rw-r--r--server.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/server.js b/server.js
index e47f165..3904593 100644
--- a/server.js
+++ b/server.js
@@ -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
}
}