Compare commits
2 commits
b9b49df009
...
f115ab67b8
Author | SHA1 | Date | |
---|---|---|---|
f115ab67b8 | |||
3a663cb56e |
2 changed files with 15 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "apb"
|
name = "apb"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = [ "alemi <me@alemi.dev>" ]
|
authors = [ "alemi <me@alemi.dev>" ]
|
||||||
description = "Traits and types to handle ActivityPub objects"
|
description = "Traits and types to handle ActivityPub objects"
|
||||||
|
@ -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