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 9 months ago
commit c8f3f8a668764eb100d36c83110156079247bdf9
parent eac192ae8b9549d6883d4ca0926de387f6576dcd
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 {