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 33d4126e8d98056938c1896513bf5a9fe4067c5b
parent 6f5bcf0ea6487470bcafcc244785cf8cddefa9aa
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 {