You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var gun1 = new Gun({peers:['https://gunjs.herokuapp.com/gun'], radisk: false, localStorage: false});
var gun2 = new Gun({peers:['https://gunjs.herokuapp.com/gun'], radisk: false, localStorage: false});
var gun3 = new Gun({peers:['https://gunjs.herokuapp.com/gun'], radisk: false, localStorage: false});
Gun.SEA.pair().then(pair => {
// This console.log is not called:
gun1.user(pair.pub).get('chats').get('someChatID').get('msgs').map().on(msg => console.log(1, msg));
var user = gun2.user();
user.auth(pair);
user.get('chats').get('someChatID').get('msgs').get(new Date().toISOString()).put({text:'hello world'});
setTimeout(() => {
// Only this console.log is called.
// If you change gun3 -> gun1 (resubscribe), both console.logs are called.
// Also, if you change .on -> .once, it prints an empty object.
gun3.user(pair.pub).get('chats').get('someChatID').get('msgs').map().on(msg => console.log(2, msg));
}, 2000);
});
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: