diff --git a/acrate-webfinger/src/route.rs b/acrate-webfinger/src/route.rs index 13a7d7d..3c51847 100644 --- a/acrate-webfinger/src/route.rs +++ b/acrate-webfinger/src/route.rs @@ -74,6 +74,8 @@ pub async fn webfinger_handler( return Ok(response); } + let subject = subject.subject.clone(); + let aliases = MetaAlias::query_matching(&mut conn, WEBFINGER_DOC, &resource) .await .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; @@ -127,8 +129,6 @@ pub async fn webfinger_handler( match mime { "*/*" | "application/json" | "application/jrd+json" => { - let subject = Some(resource); - let aliases = aliases .into_iter() .map(|alias| alias.alias) @@ -175,8 +175,6 @@ pub async fn webfinger_handler( return Ok(response); }, "application/xml" | "application/xrd+xml" => { - let subject = Some(resource); - let aliases = aliases .into_iter() .map(|alias| alias.alias) @@ -265,7 +263,7 @@ pub async fn webfinger_handler( .expect("webfinger.html.j2 to exist") .render( minijinja::context!( - subject => resource, + subject => subject, aliases => aliases, properties => properties, links => links,