diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a08010..6182cdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.4.3] — 2026-07-11 + +### Bug fixes + +- NodeInfo 2.0 response now includes the required `$schema` field (`http://nodeinfo.diaspora.software/ns/schema/2.0#`). Validators like browser.pub rejected the previous response for missing it. + +--- + ## [0.4.2] — 2026-07-10 ### New features diff --git a/Cargo.lock b/Cargo.lock index 17e990d..b9580be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1368,7 +1368,7 @@ dependencies = [ [[package]] name = "k-ap" -version = "0.4.2" +version = "0.4.3" dependencies = [ "activitypub_federation", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index d6441de..d94d4e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "k-ap" -version = "0.4.2" +version = "0.4.3" edition = "2024" description = "Generic ActivityPub protocol layer" license = "MIT" diff --git a/src/nodeinfo.rs b/src/nodeinfo.rs index db0d538..d8dc6c2 100644 --- a/src/nodeinfo.rs +++ b/src/nodeinfo.rs @@ -6,6 +6,7 @@ use crate::data::FederationData; use crate::error::Error; const NODEINFO_2_0_REL: &str = "http://nodeinfo.diaspora.software/ns/schema/2.0"; +const NODEINFO_2_0_SCHEMA: &str = "http://nodeinfo.diaspora.software/ns/schema/2.0#"; #[derive(Serialize)] pub struct NodeInfoWellKnown { @@ -39,6 +40,8 @@ pub struct NodeInfoUsers { #[derive(Serialize)] #[serde(rename_all = "camelCase")] pub struct NodeInfo { + #[serde(rename = "$schema")] + pub schema: String, pub version: String, pub software: NodeInfoSoftware, pub protocols: Vec, @@ -63,6 +66,7 @@ pub async fn nodeinfo_handler(data: Data) -> Result