- let request_counter = &mut 0;
- let actor =
- get_or_fetch_and_upsert_actor(activity.actor().clone(), context, request_counter).await?;
- verify_signature(&request, &actor.public_key().context(location_info!())?)?;
-
- // Do nothing if we received the same activity before
- if is_activity_already_known(context.pool(), activity.id_unchecked()).await? {
- return Ok(HttpResponse::Ok().finish());
- }
- check_is_apub_id_valid(activity.actor(), false)?;
- info!("Verifying activity {}", activity.id_unchecked().to_string());
- activity.verify(context, request_counter).await?;
- assert_activity_not_local(&activity)?;