ipfs-shipyard / ipfs-pubsub-1on1

1-to-1 communication channel over IPFS Pubsub between two peers
25 stars 11 forks source link

Does not work using IPFS API #1

Closed fazo96 closed 6 years ago

fazo96 commented 6 years ago

Unfortunately this way of getting the peer ID https://github.com/haadcode/ipfs-pubsub-1on1/blob/master/src/get-peer-id.js#L4 does not play well with IPFS API.

The correct way would be (await ipfs.id()).id but unfortunately it's an async operation, and getPeerID is called from a constructor!

I'll see if I can find a good way to fix it

haadcode commented 6 years ago

Thanks for fixing this @fazo96! ❤️The fix is now released in the latest version 0.0.4.

haadcode commented 6 years ago

Merged to master in OrbitDB too https://github.com/orbitdb/orbit-db/pull/359