- async fn verify(
- &self,
- context: &Data<LemmyContext>,
- request_counter: &mut i32,
- ) -> Result<(), LemmyError> {
- verify_person(&self.actor, context, request_counter).await?;
- let community = self
- .object
- .dereference::<LemmyError>(context, local_instance(context), request_counter)
- .await?;
- verify_person_in_community(&self.actor, &community, context, request_counter).await?;
+ async fn verify(&self, context: &Data<LemmyContext>) -> Result<(), LemmyError> {
+ insert_received_activity(&self.id, context).await?;
+ verify_person(&self.actor, context).await?;
+ let object = self.object.dereference(context).await?;
+ if let UserOrCommunity::Community(c) = object {
+ verify_person_in_community(&self.actor, &c, context).await?;
+ }
+ if let Some(to) = &self.to {
+ verify_urls_match(to[0].inner(), self.object.inner())?;
+ }