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
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:
@@ -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(¬e).unwrap();
|
||||
assert!(json.contains(AS_PUBLIC));
|
||||
assert!(json.contains("Hello world"));
|
||||
assert!(json.contains("\"url\""));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user