Skip to content

Commit

Permalink
Use absolute IRI for IDs in Atom
Browse files Browse the repository at this point in the history
  • Loading branch information
KitaitiMakoto committed May 3, 2020
1 parent 3a6013c commit 148d0a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/routes/blogs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ pub fn atom_feed(name: String, rockets: PlumeRocket) -> Option<Content<String>>
Utc.from_utc_datetime(&entries[0].creation_date)
}
.to_rfc3339();
let uri = uri!(atom_feed: name = name).to_string();
let uri = Instance::get_local()
.ok()?
.compute_box("~", &name, "atom.xml");
let feed = FeedBuilder::default()
.title(blog.title)
.id(&uri)
Expand Down
4 changes: 3 additions & 1 deletion src/routes/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,9 @@ pub fn atom_feed(name: String, rockets: PlumeRocket) -> Option<Content<String>>
Utc.from_utc_datetime(&entries[0].creation_date)
}
.to_rfc3339();
let uri = uri!(atom_feed: name = name).to_string();
let uri = Instance::get_local()
.ok()?
.compute_box("@", &name, "atom.xml");
let feed = FeedBuilder::default()
.title(author.display_name)
.id(&uri)
Expand Down

0 comments on commit 148d0a1

Please sign in to comment.