+ #[tracing::instrument(skip_all)]
+ async fn verify(
+ person: &Person,
+ expected_domain: &Url,
+ context: &Data<Self::DataType>,
+ ) -> Result<(), LemmyError> {
+ let local_site_data = local_site_data_cached(&mut context.pool()).await?;
+ let slur_regex = &local_site_opt_to_slur_regex(&local_site_data.local_site);
+ check_slurs(&person.preferred_username, slur_regex)?;
+ check_slurs_opt(&person.name, slur_regex)?;
+
+ verify_domains_match(person.id.inner(), expected_domain)?;
+ check_apub_id_valid_with_strictness(person.id.inner(), false, context).await?;
+
+ let bio = read_from_string_or_source_opt(&person.summary, &None, &person.source);
+ check_slurs_opt(&bio, slur_regex)?;
+ Ok(())