- pub async fn send(
- follow: FollowCommunity,
- context: &LemmyContext,
- request_counter: &mut i32,
- ) -> Result<(), LemmyError> {
- let community = follow
- .object
- .dereference_local::<LemmyError>(context)
- .await?;
- let person = follow
- .actor
- .clone()
- .dereference::<LemmyError>(context, local_instance(context), request_counter)
- .await?;
- let accept = AcceptFollowCommunity {
- actor: ObjectId::new(community.actor_id()),
+ pub async fn send(follow: Follow, context: &Data<LemmyContext>) -> Result<(), LemmyError> {
+ let user_or_community = follow.object.dereference_local(context).await?;
+ let person = follow.actor.clone().dereference(context).await?;
+ let accept = AcceptFollow {
+ actor: user_or_community.id().into(),
+ to: Some([person.id().into()]),