web: save contacts works

This commit is contained in:
Thomas Mathews 2022-12-19 22:14:15 -08:00
parent 4db7250ccc
commit 643add9177
5 changed files with 73 additions and 5 deletions

View file

@ -35,6 +35,7 @@ async function damus_web_init_ready() {
model.pubkey = await get_pubkey()
if (!model.pubkey)
return
const {RelayPool} = nostrjs
const pool = RelayPool(BOOTSTRAP_RELAYS)
const ids = {
@ -50,6 +51,12 @@ async function damus_web_init_ready() {
dms: "dms",
}
let err;
err = await contacts_load(model);
if (err) {
window.alert("Unable to load contacts.");
}
model.ids = ids
model.pool = pool
model.view_el = document.querySelector("#view")