diff --git a/apb/Cargo.toml b/apb/Cargo.toml index 6775ef27..374d8d6c 100644 --- a/apb/Cargo.toml +++ b/apb/Cargo.toml @@ -26,7 +26,7 @@ reqwest = { version = "0.12", features = ["json"], optional = true } [features] default = ["activitypub-miscellaneous-terms"] # extensions -activitypub-miscellaneous-terms = [] +activitypub-miscellaneous-terms = [] # https://swicg.github.io/miscellany/ activitypub-counters = [] # https://ns.alemi.dev/as/counters/# # builtin utils orm = ["dep:sea-orm"] diff --git a/apb/src/types/object/actor.rs b/apb/src/types/object/actor.rs index 66056330..214bd5b1 100644 --- a/apb/src/types/object/actor.rs +++ b/apb/src/types/object/actor.rs @@ -52,6 +52,12 @@ pub trait ActorMut : ObjectMut { fn set_streams(self, val: Node) -> Self; fn set_endpoints(self, val: Node) -> Self; // TODO it's more complex than this! fn set_public_key(self, val: Node) -> Self; + + #[cfg(feature = "activitypub-miscellaneous-terms")] + fn set_moved_to(self, val: Node) -> Self; + #[cfg(feature = "activitypub-miscellaneous-terms")] + fn set_manually_approves_followers(self, val: Option) -> Self; + #[cfg(feature = "activitypub-fe")] fn set_following_me(self, val: Option) -> Self; #[cfg(feature = "activitypub-fe")] @@ -74,6 +80,11 @@ impl Actor for serde_json::Value { crate::getter! { streams -> node Self::Collection } crate::getter! { public_key::publicKey -> node Self::PublicKey } + #[cfg(feature = "activitypub-miscellaneous-terms")] + crate::getter! { moved_to::movedTo -> node Self::Actor } + #[cfg(feature = "activitypub-miscellaneous-terms")] + crate::getter! { manually_approves_followers::manuallyApprovedFollowers -> bool } + #[cfg(feature = "activitypub-fe")] crate::getter! { following_me::followingMe -> bool } #[cfg(feature = "activitypub-fe")] @@ -101,6 +112,10 @@ impl ActorMut for serde_json::Value { crate::setter! { public_key::publicKey -> node Self::PublicKey } crate::setter! { discoverable -> bool } + #[cfg(feature = "activitypub-miscellaneous-terms")] + crate::setter! { moved_to::movedTo -> node Self::Actor } + #[cfg(feature = "activitypub-miscellaneous-terms")] + crate::setter! { manually_approves_followers::manuallyApprovedFollowers -> bool } #[cfg(feature = "activitypub-fe")] crate::setter! { following_me::followingMe -> bool }