ipfs-shipyard / y-ipfs-connector

Y.js connector over IPFS
MIT License
58 stars 9 forks source link

js-ipfs 0.33.0 and above do not work well with yjs "y-ipfs-connector" #15

Open mccoysc opened 5 years ago

mccoysc commented 5 years ago

js-ipfs 0.33.0 and above do not work well with yjs "y-ipfs-connector". i found that after yjs init ok,the "await ipfs.pubsub.ls()" would list an empty topic array....this is not in normal state....it means "y-ipfs-connector" subscribe nothing from ipfs, so it will receive nothing from ipfs

mccoysc commented 5 years ago

I suggest that y-ipfs-connector should remove the dpendcy of ipfs-pubsub-room. and then,require the user supply some callback functins in init options like 'onSubscribe' for subscribe a topic and 'onMessage' for indicating an incoming message and 'sendMessage' for sending a meassage out and so on