damus.io

damus.io website
git clone git://jb55.com/damus.io
Log | Files | Refs | README | LICENSE

commit b081e1cefcf51c61144e287c4847fdafc1069bf1
parent 1192cd3b303f9aff200f334198db2667146cb490
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 14 Nov 2022 16:57:19 -0800

web: fix obscure relay bug

Diffstat:
Mweb/index.html | 2+-
Mweb/js/damus.js | 8++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/web/index.html b/web/index.html @@ -12,7 +12,7 @@ <script defer src="js/noble-secp256k1.js?v=1"></script> <script defer src="js/bech32.js?v=1"></script> <script defer src="js/nostr.js?v=6"></script> - <script defer src="js/damus.js?v=74"></script> + <script defer src="js/damus.js?v=76"></script> </head> <body> <script> diff --git a/web/js/damus.js b/web/js/damus.js @@ -50,7 +50,7 @@ function init_timeline(name) { function init_home_model() { return { - done_init: false, + done_init: {}, notifications: 0, all_events: {}, reactions_to: {}, @@ -141,7 +141,7 @@ async function damus_web_init() // TODO: fetch contact list log_debug("relay connected", relay.url) - if (!model.done_init) { + if (!model.done_init[relay]) { send_initial_filters(ids.account, model.pubkey, relay) } else { send_home_filters(ids, model, relay) @@ -368,8 +368,8 @@ function handle_home_event(ids, model, relay, sub_id, ev) { case ids.account: switch (ev.kind) { case 3: - model.done_init = true - model.pool.unsubscribe(ids.account, [relay]) + model.done_init[relay] = true + model.pool.unsubscribe(ids.account, relay) break } case ids.profiles: