aboutsummaryrefslogtreecommitdiff
path: root/lib.js
diff options
context:
space:
mode:
authorEv Bogue <ev@evbogue.com>2019-04-08 17:12:30 -0500
committerEv Bogue <ev@evbogue.com>2019-04-08 17:12:30 -0500
commit4082eaf9abf560c0299780cf50e2583f3185017c (patch)
treee9e8780277ecec152b299bdb054afbcc76dba06e /lib.js
parentc05445d48c439810820e1c0d5fa5b218ea7dd0c6 (diff)
add multipub sync
Diffstat (limited to 'lib.js')
-rw-r--r--lib.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib.js b/lib.js
index fef6dc7..659976f 100644
--- a/lib.js
+++ b/lib.js
@@ -65,7 +65,6 @@ function requestFeed (src, server) {
var newLog = diff.concat(oldLog)
localStorage['log'] = JSON.stringify(newLog)
-
location.reload()
}
}
@@ -96,7 +95,12 @@ function publish (content, keys) {
// update the log
updateLog(keys.publicKey, post)
- requestFeed(keys.publicKey, 'ws://bogbook.com/')
+
+ var pubs = JSON.parse(localStorage['pubs'])
+
+ for (i = 0; i < pubs.length; i++) {
+ requestFeed(keys.publicKey, pubs[i])
+ }
var scroller = document.getElementById('scroller')
if (scroller.firstChild) {