aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stream/streamitem.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/stream/streamitem.rs b/src/stream/streamitem.rs
index 514cae3..d30be9e 100644
--- a/src/stream/streamitem.rs
+++ b/src/stream/streamitem.rs
@@ -11,6 +11,8 @@ use super::datetime::DateTime;
use super::verb::Verb;
use serde::Deserialize;
+use url::Url;
+use uuid::Uuid;
#[derive(Debug, Deserialize, PartialEq)]
pub enum StreamItemType {
@@ -33,6 +35,12 @@ pub struct StreamItem {
pub item_type: StreamItemType,
pub encoding: StreamItemEncoding,
+ pub uuid: Uuid,
+ pub message_id: Url,
+ pub message_top: Url,
+ pub message_parent: Url,
+ pub permalink: Url,
+
/*
* Date and time fields for when the item was
* created, last edited or commented, as well as
@@ -142,6 +150,11 @@ mod test {
assert_eq!(StreamItemType::Activity, item.item_type);
assert_eq!(StreamItemEncoding::Zot, item.encoding);
+ assert_eq!("2c102ec3-676b-4d84-b2b4-9141467a254f", item.uuid.to_string());
+ assert_eq!("https://example.com/item/2c102ec3-676b-4d84-b2b4-9141467a254f", item.message_id.to_string());
+ assert_eq!("https://example.com/item/2c102ec3-676b-4d84-b2b4-9141467a254f", item.message_top.to_string());
+ assert_eq!("https://example.com/item/2c102ec3-676b-4d84-b2b4-9141467a254f", item.message_parent.to_string());
+ assert_eq!("https://example.com/item/2c102ec3-676b-4d84-b2b4-9141467a254f", item.permalink.to_string());
assert_eq!(Verb::Post, item.verb);
assert_eq!("The item title", &item.title);
assert_eq!("The summary of the post", &item.summary);