Skip to content

Commit

Permalink
sdk: refactor get_contact_list_public_keys method
Browse files Browse the repository at this point in the history
  • Loading branch information
yukibtc committed Oct 27, 2023
1 parent 1469810 commit 2799d03
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions crates/nostr-sdk/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -927,13 +927,7 @@ impl Client {
let events: Vec<Event> = self.get_events_of(filters, timeout).await?;

for event in events.into_iter() {
for tag in event.tags.into_iter() {
match tag {
Tag::PubKey(pk, _) => pubkeys.push(pk),
Tag::ContactList { pk, .. } => pubkeys.push(pk),
_ => (),
}
}
pubkeys.extend(event.public_keys());
}

Ok(pubkeys)
Expand Down

0 comments on commit 2799d03

Please sign in to comment.