From 689500f5f8978d29e535d8c33932ca69dcd43553 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 14 Nov 2025 21:59:47 +0000 Subject: fix: fetch report showing cached profile event as new it was only checking local cache, where profile events are stored only stored in global --- src/lib/client.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/lib') diff --git a/src/lib/client.rs b/src/lib/client.rs index 1cb1a4a..60c22fc 100644 --- a/src/lib/client.rs +++ b/src/lib/client.rs @@ -1558,6 +1558,20 @@ async fn create_relays_request( ) { if let Some(git_repo_path) = git_repo_path { for (id, _) in get_local_cache_database(git_repo_path) + .await? + .negentropy_items(filter.clone()) + .await? + { + existing_events.insert(id); + } + } + // Also check global cache for profile events to avoid re-fetching + if filter.kinds.as_ref().map_or(false, |kinds| { + kinds.iter().any(|k| { + k.eq(&Kind::Metadata) || k.eq(&Kind::RelayList) || k.eq(&KIND_USER_GRASP_LIST) + }) + }) { + for (id, _) in get_global_cache_database(git_repo_path) .await? .negentropy_items(filter) .await? -- cgit v1.2.3