use crate::{
activities::{generate_activity_id, send_lemmy_activity},
+ check_apub_id_valid,
+ fetch_local_site_data,
local_instance,
protocol::activities::following::{accept::AcceptFollowCommunity, follow::FollowCommunity},
ActorType,
context: &Data<LemmyContext>,
request_counter: &mut i32,
) -> Result<(), LemmyError> {
+ let local_site_data = blocking(context.pool(), fetch_local_site_data).await??;
+ check_apub_id_valid(self.id(), &local_site_data, context.settings())
+ .map_err(LemmyError::from_message)?;
+
verify_urls_match(self.actor.inner(), self.object.object.inner())?;
self.object.verify(context, request_counter).await?;
Ok(())