diff --git a/apb/src/types/object/activity/mod.rs b/apb/src/types/object/activity/mod.rs index 1933834..2cc890b 100644 --- a/apb/src/types/object/activity/mod.rs +++ b/apb/src/types/object/activity/mod.rs @@ -93,6 +93,9 @@ pub trait Activity : Object { fn origin(&self) -> Node { Node::Empty } /// Identifies one or more objects used (or to be used) in the completion of an Activity. fn instrument(&self) -> Node { Node::Empty } + + #[cfg(feature = "activitypub-fe")] + fn seen(&self) -> Field { Err(FieldErr("seen")) } } pub trait ActivityMut : ObjectMut { @@ -103,6 +106,9 @@ pub trait ActivityMut : ObjectMut { fn set_result(self, val: Node) -> Self; fn set_origin(self, val: Node) -> Self; fn set_instrument(self, val: Node) -> Self; + + #[cfg(feature = "activitypub-fe")] + fn set_seen(self, val: Option) -> Self; } #[cfg(feature = "unstructured")] @@ -114,6 +120,9 @@ impl Activity for serde_json::Value { crate::getter! { result -> node ::Object } crate::getter! { origin -> node ::Object } crate::getter! { instrument -> node ::Object } + + #[cfg(feature = "activitypub-fe")] + crate::getter! { seen -> bool } } #[cfg(feature = "unstructured")] @@ -125,4 +134,7 @@ impl ActivityMut for serde_json::Value { crate::setter! { result -> node ::Object } crate::setter! { origin -> node ::Object } crate::setter! { instrument -> node ::Object } + + #[cfg(feature = "activitypub-fe")] + crate::setter! { seen -> bool } }