pub(in crate::activities::voting) fn new(
object: &PostOrComment,
actor: &ApubPerson,
- community: &ApubCommunity,
kind: VoteType,
context: &LemmyContext,
) -> Result<Vote, LemmyError> {
Ok(Vote {
actor: ObjectId::new(actor.actor_id()),
- to: vec![community.actor_id()],
object: ObjectId::new(object.ap_id()),
cc: vec![public()],
kind: kind.clone(),
})
.await??
.into();
- let vote = Vote::new(object, actor, &community, kind, context)?;
+ let vote = Vote::new(object, actor, kind, context)?;
let activity = AnnouncableActivities::Vote(vote);
send_activity_in_community(activity, actor, &community, vec![], context).await