-
- pub async fn send(
- object: &PostOrComment,
- actor: &ApubPerson,
- community_id: CommunityId,
- kind: VoteType,
- context: &LemmyContext,
- ) -> Result<(), LemmyError> {
- let community = blocking(context.pool(), move |conn| {
- Community::read(conn, community_id)
- })
- .await??
- .into();
- let vote = Vote::new(object, actor, &community, kind, context)?;
- let vote_id = vote.id.clone();
-
- let activity = AnnouncableActivities::Vote(vote);
- send_to_community(activity, &vote_id, actor, &community, vec![], context).await
- }