web: save contacts works
This commit is contained in:
parent
4db7250ccc
commit
643add9177
5 changed files with 73 additions and 5 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue