aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream/streamitem.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/streamitem.rs')
-rw-r--r--src/stream/streamitem.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/stream/streamitem.rs b/src/stream/streamitem.rs
index d30be9e..3040dea 100644
--- a/src/stream/streamitem.rs
+++ b/src/stream/streamitem.rs
@@ -7,7 +7,9 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
+use super::actor::Actor;
use super::datetime::DateTime;
+use super::Tag;
use super::verb::Verb;
use serde::Deserialize;
@@ -26,6 +28,12 @@ pub enum StreamItemEncoding {
Zot,
}
+#[derive(Debug, Deserialize, PartialEq)]
+pub enum StreamItemFlag {
+ #[serde(rename="thread_parent")]
+ ThreadParent,
+}
+
/**
* Represents an item as returned by the stream API's.
*/
@@ -56,6 +64,13 @@ pub struct StreamItem {
pub title: String,
pub summary: String,
pub body: String,
+
+ pub owner: Actor,
+ pub author: Actor,
+
+ pub signature: String,
+ pub flags: Vec<StreamItemFlag>,
+ pub tags: Vec<Tag>,
}
impl StreamItem {
@@ -163,5 +178,6 @@ mod test {
assert_eq!("2023-12-12 17:00:42", &item.edited.to_string());
assert_eq!("0000-00-00 00:00:00", &item.expires.to_string());
assert_eq!("2023-12-19 09:01:15", &item.commented.to_string());
+ assert_eq!(StreamItemFlag::ThreadParent, item.flags[0]);
}
}