mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-24 14:31:35 +00:00
chore: update pubsub example by disabled emit self (#823)
This commit is contained in:
committed by
Vasco Santos
parent
7d76ba1367
commit
f7e1426b9e
@ -43,6 +43,7 @@ const createNode = async () => {
|
||||
})
|
||||
await node1.pubsub.subscribe(topic)
|
||||
|
||||
// Will not receive own published messages by default
|
||||
node2.pubsub.on(topic, (msg) => {
|
||||
console.log(`node2 received: ${uint8ArrayToString(msg.data)}`)
|
||||
})
|
||||
|
Reference in New Issue
Block a user