Fix for contacts loading from relay.
This commit is contained in:
parent
4fbb7875fb
commit
07171f7f08
1 changed files with 3 additions and 0 deletions
|
@ -7,7 +7,10 @@ function contact_is_friend(contacts, pk) {
|
|||
function contacts_process_event(contacts, our_pubkey, ev) {
|
||||
if (ev.pubkey !== our_pubkey)
|
||||
return;
|
||||
if (contacts.event && ev.created_at < contacts.event.created_at)
|
||||
return;
|
||||
contacts.event = ev
|
||||
contacts.friends = new Set();
|
||||
for (const tag of ev.tags) {
|
||||
if (tag.length > 1 && tag[0] === "p") {
|
||||
contacts.friends.add(tag[1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue