diff options
Diffstat (limited to 'src/bin/git_remote_nostr/utils.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/utils.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/bin/git_remote_nostr/utils.rs b/src/bin/git_remote_nostr/utils.rs index 8e89652..15ebb10 100644 --- a/src/bin/git_remote_nostr/utils.rs +++ b/src/bin/git_remote_nostr/utils.rs | |||
| @@ -6,7 +6,7 @@ use std::{ | |||
| 6 | str::FromStr, | 6 | str::FromStr, |
| 7 | }; | 7 | }; |
| 8 | 8 | ||
| 9 | use anyhow::{bail, Context, Result}; | 9 | use anyhow::{Context, Result, bail}; |
| 10 | use git2::Repository; | 10 | use git2::Repository; |
| 11 | use ngit::{ | 11 | use ngit::{ |
| 12 | client::{ | 12 | client::{ |
| @@ -14,8 +14,8 @@ use ngit::{ | |||
| 14 | get_proposals_and_revisions_from_cache, | 14 | get_proposals_and_revisions_from_cache, |
| 15 | }, | 15 | }, |
| 16 | git::{ | 16 | git::{ |
| 17 | nostr_url::{CloneUrl, NostrUrlDecoded, ServerProtocol}, | ||
| 18 | Repo, RepoActions, | 17 | Repo, RepoActions, |
| 18 | nostr_url::{CloneUrl, NostrUrlDecoded, ServerProtocol}, | ||
| 19 | }, | 19 | }, |
| 20 | git_events::{ | 20 | git_events::{ |
| 21 | event_is_revision_root, get_most_recent_patch_with_ancestors, | 21 | event_is_revision_root, get_most_recent_patch_with_ancestors, |
| @@ -108,14 +108,11 @@ pub async fn get_open_proposals( | |||
| 108 | .collect(); | 108 | .collect(); |
| 109 | 109 | ||
| 110 | let statuses: Vec<nostr::Event> = { | 110 | let statuses: Vec<nostr::Event> = { |
| 111 | let mut statuses = get_events_from_local_cache( | 111 | let mut statuses = get_events_from_local_cache(git_repo_path, vec![ |
| 112 | git_repo_path, | 112 | nostr::Filter::default() |
| 113 | vec![ | 113 | .kinds(status_kinds().clone()) |
| 114 | nostr::Filter::default() | 114 | .events(proposals.iter().map(|e| e.id)), |
| 115 | .kinds(status_kinds().clone()) | 115 | ]) |
| 116 | .events(proposals.iter().map(|e| e.id)), | ||
| 117 | ], | ||
| 118 | ) | ||
| 119 | .await?; | 116 | .await?; |
| 120 | statuses.sort_by_key(|e| e.created_at); | 117 | statuses.sort_by_key(|e| e.created_at); |
| 121 | statuses.reverse(); | 118 | statuses.reverse(); |