diff --git a/src/activity_pub/actor.rs b/src/activity_pub/actor.rs index 06c0fde..5d229f9 100644 --- a/src/activity_pub/actor.rs +++ b/src/activity_pub/actor.rs @@ -90,7 +90,7 @@ pub trait Actor: Sized { let res = Client::new() .post(&self.compute_inbox(conn)[..]) .headers(request::headers()) - .header(request::signature(sender, request::headers, conn)) + .header(request::signature(sender, request::headers(), conn)) .header(request::digest(signed.to_string())) .body(signed.to_string()) .send(); diff --git a/src/activity_pub/request.rs b/src/activity_pub/request.rs index 0830537..97e2035 100644 --- a/src/activity_pub/request.rs +++ b/src/activity_pub/request.rs @@ -25,7 +25,7 @@ pub fn headers() -> Headers { headers } -pub fn signature(signer: S, headers: Headers, conn: &PgConnection) -> Signature { +pub fn signature(signer: &S, headers: Headers, conn: &PgConnection) -> Signature { let signed_string = headers.iter().map(|h| format!("{}: {}", h.name().to_lowercase(), h.value_string())).collect::>().join("\n"); let signed_headers = headers.iter().map(|h| h.name().to_string()).collect::>().join(" ").to_lowercase();