radicle: add missing `review_react` methods
This commit is contained in:
parent
3a47003578
commit
4e08eef8d5
|
|
@ -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.
|
/// Redact a patch review.
|
||||||
pub fn redact_review(&mut self, review: ReviewId) -> Result<(), store::Error> {
|
pub fn redact_review(&mut self, review: ReviewId) -> Result<(), store::Error> {
|
||||||
self.push(Action::ReviewRedact { review })
|
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.
|
/// Redact a patch review.
|
||||||
pub fn redact_review<G>(
|
pub fn redact_review<G>(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue