Add some other properties to Articles

This commit is contained in:
Bat 2018-05-03 23:12:28 +01:00
parent b8a41e71c5
commit b92009f487

View file

@ -96,6 +96,8 @@ impl Object for Post {
"id": self.compute_id(conn), "id": self.compute_id(conn),
"attributedTo": self.get_authors(conn).into_iter().map(|a| a.compute_id(conn)).collect::<Vec<String>>(), "attributedTo": self.get_authors(conn).into_iter().map(|a| a.compute_id(conn)).collect::<Vec<String>>(),
"content": self.content, "content": self.content,
"actor": self.get_authors(conn)[0].compute_id(conn),
"published": self.creation_date,
// TODO: "image": "image", // TODO: "image": "image",
// TODO: "preview": "preview", // TODO: "preview": "preview",
// TODO: "published": "published", // TODO: "published": "published",
@ -104,7 +106,8 @@ impl Object for Post {
"tag": [], "tag": [],
// TODO: "updated": "updated", // TODO: "updated": "updated",
// TODO: "url": "url", // TODO: "url": "url",
"to": to "to": to,
"cc": []
}) })
} }
} }