Made RelSelf resolve for local accounts
This commit is contained in:
parent
6bf7b17bab
commit
9efe935238
|
@ -73,7 +73,15 @@ pub async fn handle_webfinger(
|
||||||
let mut aliases = Vec::new();
|
let mut aliases = Vec::new();
|
||||||
|
|
||||||
match tag.host {
|
match tag.host {
|
||||||
Some(ref host) if host != &config.networking.host => {}
|
Some(ref host) if host != &config.networking.host => {
|
||||||
|
if let Some(uri) = user.uri {
|
||||||
|
links.push(WebFingerRel::RelSelf {
|
||||||
|
rel: RelSelf,
|
||||||
|
content_type: ContentActivityStreams,
|
||||||
|
href: uri,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
_ => {
|
_ => {
|
||||||
links.push(WebFingerRel::RelOStatusSubscribe {
|
links.push(WebFingerRel::RelOStatusSubscribe {
|
||||||
rel: RelOStatusSubscribe,
|
rel: RelOStatusSubscribe,
|
||||||
|
@ -95,16 +103,17 @@ pub async fn handle_webfinger(
|
||||||
});
|
});
|
||||||
|
|
||||||
aliases.push(WebFingerSubject::Url(user_url));
|
aliases.push(WebFingerSubject::Url(user_url));
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(uri) = user.uri {
|
|
||||||
links.push(WebFingerRel::RelSelf {
|
links.push(WebFingerRel::RelSelf {
|
||||||
rel: RelSelf,
|
rel: RelSelf,
|
||||||
content_type: ContentActivityStreams,
|
content_type: ContentActivityStreams,
|
||||||
href: uri,
|
href: format!(
|
||||||
|
"{}://{}/users/{}",
|
||||||
|
config.networking.protocol, config.networking.host, user.id
|
||||||
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Ok((
|
Ok((
|
||||||
[(header::CONTENT_TYPE, ContentJrdJson.as_ref())],
|
[(header::CONTENT_TYPE, ContentJrdJson.as_ref())],
|
||||||
|
|
Loading…
Reference in New Issue