chore: update pubsub example by disabled emit self (#823)

This commit is contained in:
Vasco Santos
2020-12-04 14:53:05 +01:00
committed by Vasco Santos
parent 7d76ba1367
commit f7e1426b9e
4 changed files with 16 additions and 8 deletions

View File

@ -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)}`)
})