fix: make ThoughtNote url field optional for AP compat
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user