diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-14 21:59:47 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-14 21:59:47 +0000 |
| commit | 689500f5f8978d29e535d8c33932ca69dcd43553 (patch) | |
| tree | 257e75564b18d064ddcbb502b9343b4de338594c | |
| parent | d282251af19fc7d5d4200a9441999bd1a81b2ae8 (diff) | |
fix: fetch report showing cached profile event as new
it was only checking local cache, where profile events are stored
only stored in global
| -rw-r--r-- | src/lib/client.rs | 14 |
1 files changed, 14 insertions, 0 deletions
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 | |||
| @@ -1559,6 +1559,20 @@ async fn create_relays_request( | |||
| 1559 | if let Some(git_repo_path) = git_repo_path { | 1559 | if let Some(git_repo_path) = git_repo_path { |
| 1560 | for (id, _) in get_local_cache_database(git_repo_path) | 1560 | for (id, _) in get_local_cache_database(git_repo_path) |
| 1561 | .await? | 1561 | .await? |
| 1562 | .negentropy_items(filter.clone()) | ||
| 1563 | .await? | ||
| 1564 | { | ||
| 1565 | existing_events.insert(id); | ||
| 1566 | } | ||
| 1567 | } | ||
| 1568 | // Also check global cache for profile events to avoid re-fetching | ||
| 1569 | if filter.kinds.as_ref().map_or(false, |kinds| { | ||
| 1570 | kinds.iter().any(|k| { | ||
| 1571 | k.eq(&Kind::Metadata) || k.eq(&Kind::RelayList) || k.eq(&KIND_USER_GRASP_LIST) | ||
| 1572 | }) | ||
| 1573 | }) { | ||
| 1574 | for (id, _) in get_global_cache_database(git_repo_path) | ||
| 1575 | .await? | ||
| 1562 | .negentropy_items(filter) | 1576 | .negentropy_items(filter) |
| 1563 | .await? | 1577 | .await? |
| 1564 | { | 1578 | { |