aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/federation/client.rs')
-rw-r--r--src/federation/client.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/federation/client.rs b/src/federation/client.rs
index ef6e116..85411fe 100644
--- a/src/federation/client.rs
+++ b/src/federation/client.rs
@@ -242,6 +242,15 @@ impl Record {
.map_err(|error| format!("{}: {error}", path.display()))
}
+ /// The proposals on `on` its party voted `true` on, by their hashes.
+ pub(crate) fn backs(&self, on: &Id) -> Vec<Id> {
+ self.votes_on(on)
+ .into_iter()
+ .filter(|vote| vote.yes)
+ .map(|vote| vote.proposal)
+ .collect()
+ }
+
/// Its votes on `on`, as it cast them.
fn votes_on(&self, on: &Id) -> Vec<Vote> {
self.votes