Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add Patch::has_comment_by()
Matthias Beyer committed 7 months ago
commit a62c82baacee683da3159c123ed0cd5bf0c0c7d7
parent a83f67f946e46475791350eec392f8669dcab75d
1 file changed +7 -0
modified crates/radicle/src/cob/patch.rs
@@ -781,6 +781,13 @@ impl Patch {
        };
        Ok(outcome)
    }
+

+
    pub fn has_comment_by(&self, c: Did) -> bool {
+
        self.revisions
+
            .iter()
+
            .flat_map(|(_rid, rev)| rev)
+
            .any(|revision| revision.discussion().has_participant(*c.as_key()))
+
    }
}

impl Patch {