fix(ap): add url field to Note, handle Delete(actor) and Tombstone objects
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m12s
test / unit (pull_request) Successful in 15m52s
test / integration (pull_request) Failing after 17m10s

This commit is contained in:
2026-05-14 16:47:17 +02:00
parent 458feebcdd
commit d3b7ecad15
3 changed files with 35 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ pub struct ThoughtNote {
#[serde(rename = "type")]
pub kind: NoteType,
pub id: Url,
pub url: Url, // Mastodon uses this as the clickable link
pub attributed_to: Url,
pub content: String,
pub published: DateTime<Utc>,
@@ -39,6 +40,7 @@ impl ThoughtNote {
) -> Self {
Self {
kind: Default::default(),
url: id.clone(),
id,
attributed_to: actor_url,
content,
@@ -71,5 +73,6 @@ mod tests {
let json = serde_json::to_string(&note).unwrap();
assert!(json.contains(AS_PUBLIC));
assert!(json.contains("Hello world"));
assert!(json.contains("\"url\""));
}
}