fix: find inner_event profiles from events

This commit is contained in:
Gísli Kristjánsson
2023-04-17 04:38:06 +00:00
committed by William Casarin
parent 209b23674d
commit 8f767b03ae

View File

@@ -128,11 +128,14 @@ func find_profiles_to_fetch_from_events(profiles: Profiles, events: [NostrEvent]
var pubkeys = Set<String>()
for ev in events {
if profiles.lookup(id: ev.pubkey) != nil {
continue
// lookup profiles from boosted events
if let bev = ev.inner_event, profiles.lookup(id: bev.pubkey) == nil {
pubkeys.insert(bev.pubkey)
}
pubkeys.insert(ev.pubkey)
if profiles.lookup(id: ev.pubkey) == nil {
pubkeys.insert(ev.pubkey)
}
}
return Array(pubkeys)