diff --git a/src/activities/accept.rs b/src/activities/accept.rs index beedaae..849ff06 100644 --- a/src/activities/accept.rs +++ b/src/activities/accept.rs @@ -51,11 +51,7 @@ impl Activity for AcceptActivity { .ok_or_else(|| Error::bad_request(anyhow::anyhow!("invalid actor URL in Follow")))?; let remote_actor_url = self.actor.inner().as_str().to_string(); data.follow_repo - .update_following_status( - local_user_id, - &remote_actor_url, - FollowingStatus::Accepted, - ) + .update_following_status(local_user_id, &remote_actor_url, FollowingStatus::Accepted) .await?; tracing::info!(remote_actor = %remote_actor_url, "follow accepted by remote"); diff --git a/src/actors.rs b/src/actors.rs index 6273853..6b7817c 100644 --- a/src/actors.rs +++ b/src/actors.rs @@ -119,11 +119,11 @@ impl ActorUrls { fn build(base_url: &str, user_id: uuid::Uuid) -> Self { let ap_id = crate::urls::actor_url(base_url, user_id); Self { - inbox_url: Url::parse(&format!("{}/inbox", &ap_id)).expect("valid url"), + inbox_url: Url::parse(&format!("{}/inbox", ap_id)).expect("valid url"), shared_inbox_url: Url::parse(&format!("{}/inbox", base_url)).ok(), - outbox_url: Url::parse(&format!("{}/outbox", &ap_id)).expect("valid url"), - followers_url: Url::parse(&format!("{}/followers", &ap_id)).expect("valid url"), - following_url: Url::parse(&format!("{}/following", &ap_id)).expect("valid url"), + outbox_url: Url::parse(&format!("{}/outbox", ap_id)).expect("valid url"), + followers_url: Url::parse(&format!("{}/followers", ap_id)).expect("valid url"), + following_url: Url::parse(&format!("{}/following", ap_id)).expect("valid url"), ap_id, } } @@ -285,7 +285,7 @@ impl Object for DbActor { async fn into_json(self, data: &Data) -> Result { let public_key = PublicKey { - id: format!("{}#main-key", &self.ap_id), + id: format!("{}#main-key", self.ap_id), owner: self.ap_id.clone(), public_key_pem: self.public_key_pem.clone(), };