mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-10-30 16:30:47 +08:00
radicle: add missing review_react methods
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user