fix: clippy warnings, clean up accept.rs
All checks were successful
CI / fmt (push) Successful in 34s
CI / clippy (push) Successful in 4m29s
CI / test (push) Successful in 6m32s

This commit is contained in:
2026-07-10 17:13:22 +02:00
parent f461f633b3
commit 902d38cc76
2 changed files with 6 additions and 10 deletions

View File

@@ -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");

View File

@@ -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<Self::DataType>) -> Result<Self::Kind, Self::Error> {
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(),
};