feat: respect the relay hint
This commit is contained in:
@@ -13,9 +13,8 @@ pub async fn get_event(id: &str, state: State<'_, Nostr>) -> Result<String, Stri
|
||||
Nip19::Event(event) => {
|
||||
let relays = event.relays;
|
||||
for relay in relays.into_iter() {
|
||||
let url = Url::from_str(&relay).unwrap();
|
||||
let _ = client.add_relay(&url).await.unwrap_or_default();
|
||||
client.connect_relay(&url).await.unwrap_or_default();
|
||||
let _ = client.add_relay(&relay).await.unwrap_or_default();
|
||||
client.connect_relay(&relay).await.unwrap_or_default();
|
||||
}
|
||||
Some(event.event_id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user