pub fn build_webfinger_response_with_type(
subject: String,
urls: Vec<(Url, Option<&str>)>
) -> Webfinger
Expand description
Builds a webfinger response similar to build_webfinger_response
. Use this when you want to
return multiple actors who share the same namespace and to specify the type of the actor.
urls
takes a vector of tuples. The first item of the tuple is the URL while the second
item is the type, such as "Person"
or "Group"
. If None
is passed for the type, the field
will be empty.
let subject = "acct:nutomic@lemmy.ml".to_string();
let user = Url::parse("https://lemmy.ml/u/nutomic")?;
let group = Url::parse("https://lemmy.ml/c/asklemmy")?;
build_webfinger_response_with_type(subject, vec![
(user, Some("Person")),
(group, Some("Group"))]);