Bug fixes:
- Don't request history of explore - Added method to update contacts on relay - Replace timeline view upon history loaded for various views - Don't re-apply view if already on it - Change how much history to request on explore page if viewed it recently
This commit is contained in:
parent
587c2c3b32
commit
9fa6974914
4 changed files with 71 additions and 20 deletions
19
js/core.js
19
js/core.js
|
@ -75,6 +75,25 @@ async function update_profile(profile={}) {
|
|||
return ev;
|
||||
}
|
||||
|
||||
async function update_contacts() {
|
||||
const model = DAMUS;
|
||||
const contacts = Array.from(model.contacts.friends);
|
||||
const tags = contacts.map((pubkey) => {
|
||||
return ["p", pubkey]
|
||||
});
|
||||
let ev = {
|
||||
kind: KIND_CONTACT,
|
||||
created_at: new_creation_time(),
|
||||
pubkey: model.pubkey,
|
||||
content: "",
|
||||
tags: tags,
|
||||
}
|
||||
ev.id = await nostrjs.calculate_id(ev);
|
||||
ev = await sign_event(ev);
|
||||
broadcast_event(ev);
|
||||
return ev;
|
||||
}
|
||||
|
||||
async function sign_event(ev) {
|
||||
if (window.nostr && window.nostr.signEvent) {
|
||||
const signed = await window.nostr.signEvent(ev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue