diff options
Diffstat (limited to 'src/bin/git_remote_nostr/utils.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/utils.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/git_remote_nostr/utils.rs b/src/bin/git_remote_nostr/utils.rs index 3ae1bab..a8bbd6f 100644 --- a/src/bin/git_remote_nostr/utils.rs +++ b/src/bin/git_remote_nostr/utils.rs | |||
| @@ -113,7 +113,7 @@ pub async fn get_open_proposals( | |||
| 113 | vec![ | 113 | vec![ |
| 114 | nostr::Filter::default() | 114 | nostr::Filter::default() |
| 115 | .kinds(status_kinds().clone()) | 115 | .kinds(status_kinds().clone()) |
| 116 | .events(proposals.iter().map(nostr::Event::id)), | 116 | .events(proposals.iter().map(|e| e.id)), |
| 117 | ], | 117 | ], |
| 118 | ) | 118 | ) |
| 119 | .await?; | 119 | .await?; |
| @@ -127,15 +127,15 @@ pub async fn get_open_proposals( | |||
| 127 | let status = if let Some(e) = statuses | 127 | let status = if let Some(e) = statuses |
| 128 | .iter() | 128 | .iter() |
| 129 | .filter(|e| { | 129 | .filter(|e| { |
| 130 | status_kinds().contains(&e.kind()) | 130 | status_kinds().contains(&e.kind) |
| 131 | && e.tags() | 131 | && e.tags |
| 132 | .iter() | 132 | .iter() |
| 133 | .any(|t| t.as_vec()[1].eq(&proposal.id.to_string())) | 133 | .any(|t| t.as_slice()[1].eq(&proposal.id.to_string())) |
| 134 | }) | 134 | }) |
| 135 | .collect::<Vec<&nostr::Event>>() | 135 | .collect::<Vec<&nostr::Event>>() |
| 136 | .first() | 136 | .first() |
| 137 | { | 137 | { |
| 138 | e.kind() | 138 | e.kind |
| 139 | } else { | 139 | } else { |
| 140 | Kind::GitStatusOpen | 140 | Kind::GitStatusOpen |
| 141 | }; | 141 | }; |
| @@ -148,7 +148,7 @@ pub async fn get_open_proposals( | |||
| 148 | get_most_recent_patch_with_ancestors(commits_events.clone()) | 148 | get_most_recent_patch_with_ancestors(commits_events.clone()) |
| 149 | { | 149 | { |
| 150 | open_proposals | 150 | open_proposals |
| 151 | .insert(proposal.id(), (proposal, most_recent_proposal_patch_chain)); | 151 | .insert(proposal.id, (proposal, most_recent_proposal_patch_chain)); |
| 152 | } | 152 | } |
| 153 | } | 153 | } |
| 154 | } | 154 | } |
| @@ -178,7 +178,7 @@ pub async fn get_all_proposals( | |||
| 178 | if let Ok(most_recent_proposal_patch_chain) = | 178 | if let Ok(most_recent_proposal_patch_chain) = |
| 179 | get_most_recent_patch_with_ancestors(commits_events.clone()) | 179 | get_most_recent_patch_with_ancestors(commits_events.clone()) |
| 180 | { | 180 | { |
| 181 | all_proposals.insert(proposal.id(), (proposal, most_recent_proposal_patch_chain)); | 181 | all_proposals.insert(proposal.id, (proposal, most_recent_proposal_patch_chain)); |
| 182 | } | 182 | } |
| 183 | } | 183 | } |
| 184 | } | 184 | } |