forked from snxraven/LinkUp-P2P-Chat
Opps i had array of arrays of peers in message json
This commit is contained in:
parent
2ed13e50f7
commit
051aa09c2d
2
app.js
2
app.js
@ -297,7 +297,7 @@ function sendMessage(e) {
|
||||
onMessageAdded(config.userName, message, config.userAvatar);
|
||||
|
||||
let peersPublicKeys = [];
|
||||
peersPublicKeys.push([...swarm.connections].map(peer => peer.remotePublicKey.toString('hex')));
|
||||
peersPublicKeys.push([...swarm.connections].map(peer => peer.remotePublicKey.toString('hex')).flat(1));
|
||||
peersPublicKeys.push(swarm.keyPair.publicKey.toString('hex'));
|
||||
|
||||
const messageObj = JSON.stringify({
|
||||
|
Loading…
Reference in New Issue
Block a user