Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: add missing `review_react` methods
✗ CI failure Sebastian Martinez committed 9 months ago
commit 4e08eef8d5a7c3eacf18dcd17456a2d48809151c
parent 3a47003578e33a1cf6dff40885325bbe66bcab35
2 failed (2 total) View logs
1 file changed +30 -0
modified crates/radicle/src/cob/patch.rs
@@ -1965,6 +1965,20 @@ impl<R: ReadRepository> store::Transaction<Patch, R> {
        )))
    }

+
    /// React to a review.
+
    pub fn review_react(
+
        &mut self,
+
        review: ReviewId,
+
        reaction: Reaction,
+
        active: bool,
+
    ) -> Result<(), store::Error> {
+
        self.push(Action::ReviewReact {
+
            review,
+
            reaction,
+
            active,
+
        })
+
    }
+

    /// Redact a patch review.
    pub fn redact_review(&mut self, review: ReviewId) -> Result<(), store::Error> {
        self.push(Action::ReviewRedact { review })
@@ -2328,6 +2342,22 @@ where
        })
    }

+
    /// React to a review.
+
    pub fn review_react<G>(
+
        &mut self,
+
        review: ReviewId,
+
        reaction: Reaction,
+
        active: bool,
+
        signer: &Device<G>,
+
    ) -> Result<EntryId, Error>
+
    where
+
        G: crypto::signature::Signer<crypto::Signature>,
+
    {
+
        self.transaction("React to review", signer, |tx| {
+
            tx.review_react(review, reaction, active)
+
        })
+
    }
+

    /// Redact a patch review.
    pub fn redact_review<G>(
        &mut self,