From ca83b17681f3af9941086136c6cde63e81ad82af Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 8 Jun 2024 05:00:33 +0200 Subject: [PATCH] feat(apb): added features from mastodon --- apb/src/types/object/actor.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apb/src/types/object/actor.rs b/apb/src/types/object/actor.rs index 98788a4e..d6170a90 100644 --- a/apb/src/types/object/actor.rs +++ b/apb/src/types/object/actor.rs @@ -44,6 +44,8 @@ pub trait Actor : Object { #[cfg(feature = "toot")] fn discoverable(&self) -> Field { Err(FieldErr("discoverable")) } + #[cfg(feature = "toot")] + fn featured(&self) -> Node { Node::Empty } } pub trait Endpoints : Object { @@ -95,6 +97,8 @@ pub trait ActorMut : ObjectMut { #[cfg(feature = "toot")] fn set_discoverable(self, val: Option) -> Self; + #[cfg(feature = "toot")] + fn set_featured(self, val: Node) -> Self; } pub trait EndpointsMut : ObjectMut { @@ -147,6 +151,8 @@ impl Actor for serde_json::Value { #[cfg(feature = "toot")] crate::getter! { discoverable -> bool } + #[cfg(feature = "toot")] + crate::getter! { featured -> node Self::Collection } } #[cfg(feature = "unstructured")] @@ -194,6 +200,8 @@ impl ActorMut for serde_json::Value { #[cfg(feature = "toot")] crate::setter! { discoverable -> bool } + #[cfg(feature = "toot")] + crate::setter! { featured -> node Self::Collection } } #[cfg(feature = "unstructured")]