From 165d2f0faab5f79d10f8eb4b746c97f133f548bf Mon Sep 17 00:00:00 2001 From: MrMasrozYTLIVE <61359286+MrMasrozYTLIVE@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:07:54 +0300 Subject: [PATCH] Trying to fix a bug with message peers --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 4a8545c..b17b0cd 100644 --- a/app.js +++ b/app.js @@ -302,7 +302,7 @@ function sendMessage(e) { message, avatar: config.userAvatar, topic: b4a.toString(currentRoom.topic, 'hex'), - peers: [...swarm.connections].map(peer => peer.remotePublicKey.toString('hex')), + peers: [...swarm.connections].map(peer => peer.remotePublicKey.toString('hex')).push(swarm.publicKey.toString('hex')), timestamp: Date.now(), readableTimestamp: new Date().toLocaleString(), // Added human-readable timestamp });