webfinger
: Use the subject field to determine the canonical name of the subject
This commit is contained in:
parent
219880f3d3
commit
cc6dfd0dfc
1 changed files with 3 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue