a demonstration replicated social networking web app built with anproto wiredove.net/
social ed25519 protocols

if we have not connected websocket yet give it a sec

+11 -3
+11 -3
websocket.js
··· 4 4 const pubs = new Set() 5 5 6 6 export const sendWs = async (msg) => { 7 - pubs.forEach(pub => { 8 - pub.send(msg) 9 - }) 7 + if (pubs.size) { 8 + pubs.forEach(pub => { 9 + pub.send(msg) 10 + }) 11 + } else { 12 + setTimeout(async () => { 13 + pubs.forEach(pub => { 14 + pub.send(msg) 15 + }) 16 + }, 1000) 17 + } 10 18 } 11 19 12 20 export const makeWs = async (pub) => {