Skip to content

Commit

Permalink
add: unique RSS links
Browse files Browse the repository at this point in the history
Some RSS applications required unique links to work properly.
  • Loading branch information
0xB10C committed Feb 16, 2024
1 parent 081931d commit 6ae5ffa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/rss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub async fn forks_response(
network_name
)
.to_string(),
link: format!("{}?network={}", base_url.clone(), network_id),
link: format!("{}?network={}?src=forks-rss", base_url.clone(), network_id),
href: format!("{}/rss/{}/forks.xml", base_url, network_id),
items: cache.forks.iter().map(|f| f.clone().into()).collect(),
},
Expand Down Expand Up @@ -245,7 +245,7 @@ pub async fn lagging_nodes_response(
network_name
)
.to_string(),
link: format!("{}?network={}", base_url.clone(), network_id),
link: format!("{}?network={}?src=lagging-rss", base_url.clone(), network_id),
href: format!("{}/rss/{}/lagging.xml", base_url, network_id),
items: lagging_nodes,
},
Expand Down Expand Up @@ -302,7 +302,11 @@ pub async fn invalid_blocks_response(
"Recent invalid blocks on the Bitcoin {} network",
network_name
),
link: format!("{}?network={}", base_url.clone(), network_id),
link: format!(
"{}?network={}?src=invalid-rss",
base_url.clone(),
network_id
),
href: format!("{}/rss/{}/invalid.xml", base_url, network_id),
items: invalid_blocks
.iter()
Expand Down

0 comments on commit 6ae5ffa

Please sign in to comment.