diff --git a/src/nostr_utils/mod.rs b/src/nostr_utils/mod.rs index a9992c1..26d221d 100644 --- a/src/nostr_utils/mod.rs +++ b/src/nostr_utils/mod.rs @@ -165,4 +165,16 @@ impl NostrClient { .await? .map(|e| e.pubkey)) } + + /// Adds read relays from the user to the given vector of relays. + pub async fn read_relays_from_user( + &self, + vector: Vec, + user: PublicKey, + ) -> Vec { + utils::add_read_relays( + vector, + self.user_relays_list(user).await.ok().flatten().as_ref(), + ) + } }