mirror of
https://github.com/LemmyNet/activitypub-federation-rust
synced 2024-11-10 06:04:19 +00:00
Add webfinger template field, used for remote follow (#74)
https://socialhub.activitypub.rocks/t/what-is-the-current-spec-for-remote-follow/2020/15
This commit is contained in:
parent
b0547e7793
commit
9477180b4e
1 changed files with 4 additions and 1 deletions
|
@ -165,13 +165,14 @@ pub fn build_webfinger_response_with_type(
|
||||||
rel: Some("http://webfinger.net/rel/profile-page".to_string()),
|
rel: Some("http://webfinger.net/rel/profile-page".to_string()),
|
||||||
kind: Some("text/html".to_string()),
|
kind: Some("text/html".to_string()),
|
||||||
href: Some(url.clone()),
|
href: Some(url.clone()),
|
||||||
properties: Default::default(),
|
..Default::default()
|
||||||
},
|
},
|
||||||
WebfingerLink {
|
WebfingerLink {
|
||||||
rel: Some("self".to_string()),
|
rel: Some("self".to_string()),
|
||||||
kind: Some(FEDERATION_CONTENT_TYPE.to_string()),
|
kind: Some(FEDERATION_CONTENT_TYPE.to_string()),
|
||||||
href: Some(url.clone()),
|
href: Some(url.clone()),
|
||||||
properties,
|
properties,
|
||||||
|
..Default::default()
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
acc.append(&mut links);
|
acc.append(&mut links);
|
||||||
|
@ -207,6 +208,8 @@ pub struct WebfingerLink {
|
||||||
pub kind: Option<String>,
|
pub kind: Option<String>,
|
||||||
/// Url pointing to the target resource
|
/// Url pointing to the target resource
|
||||||
pub href: Option<Url>,
|
pub href: Option<Url>,
|
||||||
|
/// Used for remote follow external interaction url
|
||||||
|
pub template: Option<String>,
|
||||||
/// Additional data about the link
|
/// Additional data about the link
|
||||||
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
|
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
|
||||||
pub properties: HashMap<Url, String>,
|
pub properties: HashMap<Url, String>,
|
||||||
|
|
Loading…
Reference in a new issue