From 051aa09c2dd8d79b307b4063bee52d804c609220 Mon Sep 17 00:00:00 2001 From: MrMasrozYTLIVE <61359286+MrMasrozYTLIVE@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:55:23 +0300 Subject: [PATCH] Opps i had array of arrays of peers in message json --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index a7e629a..571df25 100644 --- a/app.js +++ b/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({