Trying to fix a bug with message peers
This commit is contained in:
parent
24101e5611
commit
165d2f0faa
2
app.js
2
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
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user