fix: make ThoughtNote url field optional for AP compat
Some checks failed
lint / lint (push) Failing after 5m1s
test / integration (push) Has been cancelled
test / unit (push) Has been cancelled

This commit is contained in:
2026-05-17 11:57:10 +02:00
parent 18cf2c9f54
commit 9e795eefdc

View File

@@ -11,7 +11,8 @@ pub struct ThoughtNote {
#[serde(rename = "type")] #[serde(rename = "type")]
pub kind: NoteType, pub kind: NoteType,
pub id: Url, pub id: Url,
pub url: Url, // Mastodon uses this as the clickable link #[serde(skip_serializing_if = "Option::is_none", default)]
pub url: Option<Url>,
pub attributed_to: Url, pub attributed_to: Url,
pub content: String, pub content: String,
pub published: DateTime<Utc>, pub published: DateTime<Utc>,
@@ -42,7 +43,7 @@ impl ThoughtNote {
) -> Self { ) -> Self {
Self { Self {
kind: Default::default(), kind: Default::default(),
url: id.clone(), url: Some(id.clone()),
id, id,
attributed_to: actor_url, attributed_to: actor_url,
content, content,