From 1742031901a279e26cbbb3c2f94b8616258c1ae5 Mon Sep 17 00:00:00 2001 From: reya Date: Sun, 12 Oct 2025 20:51:46 +0700 Subject: [PATCH] chore: update deps --- Cargo.lock | 36 ++++++++++++++-------------- crates/app_state/src/state/gossip.rs | 35 ++++++--------------------- 2 files changed, 25 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 570720f..882ed66 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2533,7 +2533,7 @@ dependencies = [ [[package]] name = "gpui" version = "0.2.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "anyhow", "as-raw-xcb-connection", @@ -2627,7 +2627,7 @@ dependencies = [ [[package]] name = "gpui-macros" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -2639,7 +2639,7 @@ dependencies = [ [[package]] name = "gpui_tokio" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "anyhow", "gpui", @@ -2869,7 +2869,7 @@ dependencies = [ [[package]] name = "http_client_tls" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "rustls", "rustls-platform-verifier", @@ -3784,9 +3784,9 @@ dependencies = [ [[package]] name = "moxcms" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cc7d85f3d741164e8972ad355e26ac6e51b20fcae5f911c7da8f2d8bbbb3f33" +checksum = "c588e11a3082784af229e23e8e4ecf5bcc6fbe4f69101e0421ce8d79da7f0b40" dependencies = [ "num-traits", "pxfm", @@ -5210,7 +5210,7 @@ dependencies = [ [[package]] name = "reqwest_client" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "anyhow", "bytes", @@ -5265,7 +5265,7 @@ dependencies = [ [[package]] name = "rope" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "arrayvec", "log", @@ -8495,7 +8495,7 @@ dependencies = [ [[package]] name = "zed-collections" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "indexmap", "rustc-hash 2.1.1", @@ -8505,7 +8505,7 @@ dependencies = [ [[package]] name = "zed-derive-refineable" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "proc-macro2", "quote", @@ -8540,7 +8540,7 @@ dependencies = [ [[package]] name = "zed-http-client" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "anyhow", "async-compression", @@ -8566,7 +8566,7 @@ dependencies = [ [[package]] name = "zed-media" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "anyhow", "bindgen 0.71.1", @@ -8582,7 +8582,7 @@ dependencies = [ [[package]] name = "zed-perf" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "serde", "serde_json", @@ -8593,7 +8593,7 @@ dependencies = [ [[package]] name = "zed-refineable" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "workspace-hack", "zed-derive-refineable", @@ -8672,7 +8672,7 @@ dependencies = [ [[package]] name = "zed-semantic-version" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "anyhow", "serde", @@ -8682,7 +8682,7 @@ dependencies = [ [[package]] name = "zed-sum-tree" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "arrayvec", "log", @@ -8693,7 +8693,7 @@ dependencies = [ [[package]] name = "zed-util" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "anyhow", "async-fs", @@ -8729,7 +8729,7 @@ dependencies = [ [[package]] name = "zed-util-macros" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" +source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5" dependencies = [ "quote", "syn 2.0.106", diff --git a/crates/app_state/src/state/gossip.rs b/crates/app_state/src/state/gossip.rs index 779e542..02dc825 100644 --- a/crates/app_state/src/state/gossip.rs +++ b/crates/app_state/src/state/gossip.rs @@ -19,8 +19,7 @@ impl Gossip { pub fn insert(&mut self, event: &Event) { match event.kind { Kind::InboxRelays => { - let urls: Vec = - nip17::extract_relay_list(event).take(3).cloned().collect(); + let urls: Vec = nip17::extract_relay_list(event).cloned().collect(); if !urls.is_empty() { self.nip17.entry(event.pubkey).or_default().extend(urls); @@ -85,22 +84,12 @@ impl Gossip { let timeout = Duration::from_secs(5); let opts = SubscribeAutoCloseOptions::default().exit_policy(ReqExitPolicy::ExitOnEOSE); - let latest_filter = Filter::new() + let filter = Filter::new() .kind(Kind::RelayList) .author(public_key) .limit(1); // Subscribe to events from the bootstrapping relays - client - .subscribe_to(BOOTSTRAP_RELAYS, latest_filter.clone(), Some(opts)) - .await?; - - let filter = Filter::new() - .kind(Kind::RelayList) - .author(public_key) - .since(Timestamp::now()); - - // Continuously subscribe for new events from the bootstrap relays client .subscribe_to(BOOTSTRAP_RELAYS, filter.clone(), Some(opts)) .await?; @@ -109,7 +98,7 @@ impl Gossip { smol::spawn(async move { smol::Timer::after(timeout).await; - if client.database().count(latest_filter).await.unwrap_or(0) < 1 { + if client.database().count(filter).await.unwrap_or(0) < 1 { app_state() .signal .send(SignalKind::GossipRelaysNotFound) @@ -168,7 +157,7 @@ impl Gossip { // Ensure user's have at least one write relay if urls.is_empty() { - return Err(anyhow!("NIP-17 relays are empty")); + return Err(anyhow!("Write relays are empty")); } // Ensure connection to relays @@ -177,22 +166,12 @@ impl Gossip { client.connect_relay(url).await?; } - let latest_filter = Filter::new() + let filter = Filter::new() .kind(Kind::InboxRelays) .author(public_key) .limit(1); // Subscribe to events from the bootstrapping relays - client - .subscribe_to(urls.clone(), latest_filter.clone(), Some(opts)) - .await?; - - let filter = Filter::new() - .kind(Kind::InboxRelays) - .author(public_key) - .since(Timestamp::now()); - - // Continuously subscribe for new events from the bootstrap relays client .subscribe_to(urls, filter.clone(), Some(opts)) .await?; @@ -201,7 +180,7 @@ impl Gossip { smol::spawn(async move { smol::Timer::after(timeout).await; - if client.database().count(latest_filter).await.unwrap_or(0) < 1 { + if client.database().count(filter).await.unwrap_or(0) < 1 { app_state() .signal .send(SignalKind::MessagingRelaysNotFound) @@ -266,7 +245,7 @@ impl Gossip { // Ensure user's have at least one write relay if urls.is_empty() { - return Err(anyhow!("NIP-65 relays are empty")); + return Err(anyhow!("Write relays are empty")); } // Ensure connection to relays