feat(apb): added also_known_as from DID-CORE
This commit is contained in:
parent
b9b49df009
commit
3a663cb56e
2 changed files with 14 additions and 0 deletions
|
@ -32,6 +32,7 @@ activitypub-fe = [] # https://ns.alemi.dev/as/fe/#
|
||||||
ostatus = [] # https://ostatus.org# , but it redirects and 403??? just need this for conversation
|
ostatus = [] # https://ostatus.org# , but it redirects and 403??? just need this for conversation
|
||||||
toot = [] # http://joinmastodon.org/ns# , mastodon is weird tho??
|
toot = [] # http://joinmastodon.org/ns# , mastodon is weird tho??
|
||||||
litepub = [] # incomplete, https://litepub.social/
|
litepub = [] # incomplete, https://litepub.social/
|
||||||
|
did-core = [] # incomplete, may be cool to support all of this: https://www.w3.org/TR/did-core/
|
||||||
# full jsonld utilities
|
# full jsonld utilities
|
||||||
jsonld = []
|
jsonld = []
|
||||||
# builtin utils
|
# builtin utils
|
||||||
|
|
|
@ -39,6 +39,9 @@ pub trait Actor : Object {
|
||||||
#[cfg(feature = "activitypub-miscellaneous-terms")]
|
#[cfg(feature = "activitypub-miscellaneous-terms")]
|
||||||
fn manually_approves_followers(&self) -> Field<bool> { Err(FieldErr("manuallyApprovesFollowers")) }
|
fn manually_approves_followers(&self) -> Field<bool> { Err(FieldErr("manuallyApprovesFollowers")) }
|
||||||
|
|
||||||
|
#[cfg(feature = "did-core")]
|
||||||
|
fn also_known_as(&self) -> Node<Self::Actor> { Node::Empty }
|
||||||
|
|
||||||
#[cfg(feature = "activitypub-fe")]
|
#[cfg(feature = "activitypub-fe")]
|
||||||
fn following_me(&self) -> Field<bool> { Err(FieldErr("followingMe")) }
|
fn following_me(&self) -> Field<bool> { Err(FieldErr("followingMe")) }
|
||||||
#[cfg(feature = "activitypub-fe")]
|
#[cfg(feature = "activitypub-fe")]
|
||||||
|
@ -94,6 +97,9 @@ pub trait ActorMut : ObjectMut {
|
||||||
#[cfg(feature = "activitypub-miscellaneous-terms")]
|
#[cfg(feature = "activitypub-miscellaneous-terms")]
|
||||||
fn set_manually_approves_followers(self, val: Option<bool>) -> Self;
|
fn set_manually_approves_followers(self, val: Option<bool>) -> Self;
|
||||||
|
|
||||||
|
#[cfg(feature = "did-core")]
|
||||||
|
fn set_also_known_as(self, val: Node<Self::Actor>) -> Self;
|
||||||
|
|
||||||
#[cfg(feature = "activitypub-fe")]
|
#[cfg(feature = "activitypub-fe")]
|
||||||
fn set_following_me(self, val: Option<bool>) -> Self;
|
fn set_following_me(self, val: Option<bool>) -> Self;
|
||||||
#[cfg(feature = "activitypub-fe")]
|
#[cfg(feature = "activitypub-fe")]
|
||||||
|
@ -150,6 +156,9 @@ impl Actor for serde_json::Value {
|
||||||
#[cfg(feature = "activitypub-miscellaneous-terms")]
|
#[cfg(feature = "activitypub-miscellaneous-terms")]
|
||||||
crate::getter! { manuallyApprovesFollowers -> bool }
|
crate::getter! { manuallyApprovesFollowers -> bool }
|
||||||
|
|
||||||
|
#[cfg(feature = "did-core")]
|
||||||
|
crate::getter! { alsoKnownAs -> node Self::Actor }
|
||||||
|
|
||||||
#[cfg(feature = "activitypub-fe")]
|
#[cfg(feature = "activitypub-fe")]
|
||||||
crate::getter! { followingMe -> bool }
|
crate::getter! { followingMe -> bool }
|
||||||
#[cfg(feature = "activitypub-fe")]
|
#[cfg(feature = "activitypub-fe")]
|
||||||
|
@ -201,6 +210,10 @@ impl ActorMut for serde_json::Value {
|
||||||
#[cfg(feature = "activitypub-miscellaneous-terms")]
|
#[cfg(feature = "activitypub-miscellaneous-terms")]
|
||||||
crate::setter! { manuallyApprovesFollowers -> bool }
|
crate::setter! { manuallyApprovesFollowers -> bool }
|
||||||
|
|
||||||
|
|
||||||
|
#[cfg(feature = "did-core")]
|
||||||
|
crate::setter! { alsoKnownAs -> node Self::Actor }
|
||||||
|
|
||||||
#[cfg(feature = "activitypub-fe")]
|
#[cfg(feature = "activitypub-fe")]
|
||||||
crate::setter! { followingMe -> bool }
|
crate::setter! { followingMe -> bool }
|
||||||
#[cfg(feature = "activitypub-fe")]
|
#[cfg(feature = "activitypub-fe")]
|
||||||
|
|
Loading…
Reference in a new issue