Commit

Author:

Hash:

Timestamp:

+15 -10 +/-1 browse

Kevin Schoon [me@kevinschoon.com]

a2654d8978bdc045bb24f225f0fb7e092d45258b

Wed, 10 Dec 2025 12:20:41 +0000 (3 months ago)

fixup some webfinger routes per forgefeed spec
1diff --git a/ayllu/src/web2/routes/finger.rs b/ayllu/src/web2/routes/finger.rs
2index bcd29b6..54b3ad1 100644
3--- a/ayllu/src/web2/routes/finger.rs
4+++ b/ayllu/src/web2/routes/finger.rs
5 @@ -178,23 +178,30 @@ impl Resolver {
6 let mut links: Vec<Link> = repositories
7 .iter()
8 .map(|repo_name| {
9+ let repository =
10+ ayllu_git::Wrapper::new(&collection.path.join(repo_name)).ok();
11+ let config = repository.and_then(|repository| repository.config().ok());
12 Link::builder(FORGE_FEED_REL_REPOSITORY)
13 .href(
14 self.origin
15 .join(&format!("{}/{}", collection.name, repo_name))
16 .unwrap(),
17 )
18+ .title("en-us", repo_name.clone())
19+ .properties(HashMap::from_iter(vec![(
20+ FORGE_FEED_REL_DESCRIPTION.to_string(),
21+ config.and_then(|config| config.description.clone()),
22+ )]))
23 .build()
24 })
25 .collect();
26- links.push(
27- Link::builder(FORGE_FEED_REL_DESCRIPTION)
28- .properties(HashMap::from_iter(vec![(
29- "description".to_string(),
30- collection.description.clone(),
31- )]))
32- .build(),
33- );
34+ if let Some(description) = collection.description {
35+ links.push(
36+ Link::builder(FORGE_FEED_REL_DESCRIPTION)
37+ .title("en-us", description.clone())
38+ .build(),
39+ );
40+ };
41 Ok(WebFingerResponse {
42 subject: resource.to_string(),
43 aliases: None,
44 @@ -212,8 +219,6 @@ impl Resolver {
45 let mut links: Vec<Link> = vec![
46 Link::builder(FORGE_FEED_REL_PROJECT)
47 .href(collection_link.to_string())
48- .build(),
49- Link::builder(FORGE_FEED_REL_PROJECT)
50 .properties(HashMap::from_iter(vec![(
51 "description".to_string(),
52 config.description.clone(),