From 2c34eb44e420b42351a48964bfa4151c4e0bfc84 Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Sun, 17 May 2026 11:57:10 +0200 Subject: [PATCH] fix: make ThoughtNote url field optional for AP compat --- crates/adapters/activitypub/src/note/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/adapters/activitypub/src/note/mod.rs b/crates/adapters/activitypub/src/note/mod.rs index 2476639..4850587 100644 --- a/crates/adapters/activitypub/src/note/mod.rs +++ b/crates/adapters/activitypub/src/note/mod.rs @@ -11,7 +11,8 @@ pub struct ThoughtNote { #[serde(rename = "type")] pub kind: NoteType, pub id: Url, - pub url: Url, // Mastodon uses this as the clickable link + #[serde(skip_serializing_if = "Option::is_none", default)] + pub url: Option, pub attributed_to: Url, pub content: String, pub published: DateTime, @@ -42,7 +43,7 @@ impl ThoughtNote { ) -> Self { Self { kind: Default::default(), - url: id.clone(), + url: Some(id.clone()), id, attributed_to: actor_url, content,