ipfs-shipyard / ipfs-pubsub-room

IPFS Pubsub room
MIT License
288 stars 41 forks source link

Get current peerID #57

Open zrg-team opened 6 years ago

zrg-team commented 6 years ago

can i get current peer id ? after

room.on('subscribed', () => {
    console.log('Now connected!')
})
WesleyDRobinson commented 6 years ago

The peer id (ipfs node id) is available after the 'ready' event. https://github.com/ipfs-shipyard/ipfs-pubsub-room/blob/e1d1a11b238b95b41ccb4c88ebc39232e9f9104e/test/room.spec.js#L43-L47