|
|
@ -506,7 +506,7 @@ func process_metadata_event(image_cache: ImageCache, profiles: Profiles, ev: Nos |
|
|
|
profiles.add(id: ev.pubkey, profile: tprof) |
|
|
|
|
|
|
|
// load pfps asap |
|
|
|
let picture = tprof.profile.picture ?? "https://robohash.org/\(ev.pubkey)" |
|
|
|
let picture = tprof.profile.picture ?? robohash(ev.pubkey) |
|
|
|
if let url = URL(string: picture) { |
|
|
|
Task<UIImage?, Never>.init(priority: .background) { |
|
|
|
let res = await load_image(cache: image_cache, from: url) |
|
|
@ -520,6 +520,10 @@ func process_metadata_event(image_cache: ImageCache, profiles: Profiles, ev: Nos |
|
|
|
notify(.profile_updated, ProfileUpdate(pubkey: ev.pubkey, profile: profile)) |
|
|
|
} |
|
|
|
|
|
|
|
func robohash(_ pk: String) -> String { |
|
|
|
return "https://robohash.org/" + pk |
|
|
|
} |
|
|
|
|
|
|
|
func process_contact_event(pool: RelayPool, contacts: Contacts, pubkey: String, ev: NostrEvent) { |
|
|
|
load_our_contacts(contacts: contacts, our_pubkey: pubkey, ev: ev) |
|
|
|
load_our_relays(our_pubkey: pubkey, pool: pool, ev: ev) |
|
|
|