protocol::activities::following::{follow::FollowCommunity, undo_follow::UndoFollowCommunity},
};
use activitystreams_kinds::activity::UndoType;
-use lemmy_api_common::blocking;
+use lemmy_api_common::utils::blocking;
use lemmy_apub_lib::{
data::Data,
object_id::ObjectId,
use lemmy_websocket::LemmyContext;
impl UndoFollowCommunity {
+ #[tracing::instrument(skip_all)]
pub async fn send(
actor: &ApubPerson,
community: &ApubCommunity,
#[async_trait::async_trait(?Send)]
impl ActivityHandler for UndoFollowCommunity {
type DataType = LemmyContext;
+
+ #[tracing::instrument(skip_all)]
async fn verify(
&self,
context: &Data<LemmyContext>,
Ok(())
}
+ #[tracing::instrument(skip_all)]
async fn receive(
self,
context: &Data<LemmyContext>,
request_counter: &mut i32,
) -> Result<(), LemmyError> {
- let person = self.actor.dereference(context, request_counter).await?;
+ let person = self
+ .actor
+ .dereference(context, context.client(), request_counter)
+ .await?;
let community = self
.object
.object
- .dereference(context, request_counter)
+ .dereference(context, context.client(), request_counter)
.await?;
let community_follower_form = CommunityFollowerForm {
community_id: community.id,
person_id: person.id,
- pending: false,
+ pending: Some(false),
};
// This will fail if they aren't a follower, but ignore the error.