Hi, I try to publish messages over PubSub using JS IPFS, but they only seem to be sent within a single browser tab.
Reproduce:
- go to js.ipfs.io
- Enter
const node = await IPFS.create();
node.pubsub.subscribe("test", (message) => {
console.log(message.data);
});
into the first code field and hit “Run”. - Enter
const node = await IPFS.create();
node.pubsub.publish("test", "hi");
into the second code field and hit “Run”.
It will work within one tab, but if you subscribe in one tab and publish in another, the first tab won’t receive anything.
What am I doing wrong? Tried it in Firefox 86 and Brave.