diff --git a/CHANGELOG.md b/CHANGELOG.md
index d623684..bdc1af7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Dropped support for `blockchain` configuration parameter.
+### Fixed
+
+- Added missing `` element to Atom feeds.
+
## [1.11.0] - 2023-01-23
### Added
diff --git a/src/atom/feeds.rs b/src/atom/feeds.rs
index 9987895..cb6d138 100644
--- a/src/atom/feeds.rs
+++ b/src/atom/feeds.rs
@@ -42,15 +42,20 @@ fn make_entry(
)
}
+pub fn get_feed_url(instance_url: &str, username: &str) -> String {
+ format!("{}/feeds/{}", instance_url, username)
+}
+
pub fn make_feed(
instance: &Instance,
profile: &DbActorProfile,
posts: Vec,
) -> String {
- let actor_url = local_actor_id(&instance.url(), &profile.username);
+ let actor_id = local_actor_id(&instance.url(), &profile.username);
let actor_name = profile.display_name.as_ref()
.unwrap_or(&profile.username);
let actor_address = profile.actor_address(&instance.hostname());
+ let feed_url = get_feed_url(&instance.url(), &profile.username);
let feed_title = format!("{} (@{})", actor_name, actor_address);
let mut entries = vec![];
let mut feed_updated_at = get_min_datetime();
@@ -64,12 +69,14 @@ pub fn make_feed(
format!(
r#"
-{url}
+{id}
+
{title}
{updated_at}
{entries}
"#,
- url=actor_url,
+ id=actor_id,
+ url=feed_url,
title=feed_title,
updated_at=feed_updated_at.to_rfc3339(),
entries=entries.join("\n"),