diff --git a/chatBot/includes/client.js b/chatBot/includes/client.js index d55aa8c..eba3dc5 100644 --- a/chatBot/includes/client.js +++ b/chatBot/includes/client.js @@ -22,10 +22,10 @@ class Client extends EventEmitter { this.swarm.on('update', () => { console.log(`Connections count: ${this.swarm.connections.size} / Peers count: ${this.swarm.peers.size}`); - this.swarm.peers.forEach((peer, peerInfo) => { + this.swarm.peers.forEach((peerInfo, peer) => { console.log([peer]); console.log([peerInfo]); - console.log(`Peer ${[peer]} is in topic(s) ${[peer.topics].filter(topic => topic).map(topic => topic.toString('hex'))}`); + console.log(`Peer ${[peer]} is in topic(s) [${[peer.topics].filter(topic => topic).map(topic => topic.toString('hex')).join(", ")}]`); }); }); }