feat: Add gossip model (#232)

* feat: enable gossip

* chore: remove deprecated functions

* chore: use upstream rust nostr

* fix
This commit is contained in:
雨宮蓮
2024-09-11 11:10:11 +07:00
committed by GitHub
parent e5e290c0c3
commit ac7ce726c5
9 changed files with 144 additions and 177 deletions

View File

@@ -288,7 +288,7 @@ pub async fn init_nip65(client: &Client) {
Some(_) => RelayOptions::new().write(true).read(false),
None => RelayOptions::default(),
};
if let Err(e) = client.add_relay_with_opts(&url.to_string(), opts).await {
if let Err(e) = client.pool().add_relay(&url.to_string(), opts).await {
eprintln!("Failed to add relay {}: {:?}", url, e);
}
if let Err(e) = client.connect_relay(url.to_string()).await {