diff --git a/crates/jacquard/src/moderation/decision.rs b/crates/jacquard/src/moderation/decision.rs index 06d4cad65..7d60f0791 100644 --- a/crates/jacquard/src/moderation/decision.rs +++ b/crates/jacquard/src/moderation/decision.rs @@ -11,13 +11,6 @@ use jacquard_common::types::string::{Datetime, Did}; /// Takes the content, user preferences, labeler definitions, and list of accepted labelers, /// and produces a moderation decision indicating what actions to take. /// -/// # Arguments -/// -/// * `item` - The content to moderate -/// * `prefs` - User's moderation preferences -/// * `defs` - Labeler definitions describing what labels mean -/// * `accepted_labelers` - Which labelers to trust (usually from CallOptions) -/// /// # Example /// /// ```ignore diff --git a/crates/jacquard/src/moderation/fetch.rs b/crates/jacquard/src/moderation/fetch.rs index 7c8c248b7..ad3023574 100644 --- a/crates/jacquard/src/moderation/fetch.rs +++ b/crates/jacquard/src/moderation/fetch.rs @@ -7,31 +7,7 @@ use jacquard_common::error::ClientError; use jacquard_common::types::string::Did; use jacquard_common::xrpc::{XrpcClient, XrpcError}; -/// Fetch labeler definitions from app.bsky.labeler.getServices -/// -/// This is a convenience helper for fetching labeler service records from Bluesky's -/// labeler service. You can also fetch these from other indexes or sources and -/// construct a `LabelerDefs` manually. -/// -/// # Arguments -/// -/// * `client` - Any XRPC client (Agent, stateless client, etc.) -/// * `dids` - List of labeler DIDs to fetch definitions for -/// -/// # Example -/// -/// ```no_run -/// # use jacquard::moderation::fetch_labeler_defs; -/// # use jacquard::client::BasicClient; -/// # use jacquard_common::types::string::Did; -/// # #[tokio::main] -/// # async fn main() -> Result<(), Box> { -/// let client = BasicClient::unauthenticated(); -/// let labeler_did = Did::new_static("did:plc:ar7c4by46qjdydhdevvrndac").unwrap(); -/// let defs = fetch_labeler_defs(&client, vec![labeler_did]).await?; -/// # Ok(()) -/// # } -/// ``` +/// Fetch labeler definitions from Bluesky's AppView (or a compatible one) pub async fn fetch_labeler_defs( client: &(impl XrpcClient + Sync), dids: Vec>, @@ -85,26 +61,6 @@ pub async fn fetch_labeler_defs( /// This fetches the `app.bsky.labeler.service` record directly from the PDS where /// the labeler is hosted. /// -/// # Arguments -/// -/// * `client` - Any XRPC client with fetch_record support (Agent, etc.) -/// * `dids` - List of labeler DIDs to fetch definitions for -/// -/// # Example -/// -/// ```no_run -/// # use jacquard::moderation::fetch_labeler_defs_direct; -/// # use jacquard::client::BasicClient; -/// # use jacquard::prelude::*; -/// # use jacquard_common::types::string::Did; -/// # #[tokio::main] -/// # async fn main() -> Result<(), Box> { -/// # let client = BasicClient::unauthenticated(); -/// let labeler_did = Did::new_static("did:plc:ar7c4by46qjdydhdevvrndac").unwrap(); -/// let defs = fetch_labeler_defs_direct(&client, vec![labeler_did]).await?; -/// # Ok(()) -/// # } -/// ``` pub async fn fetch_labeler_defs_direct( client: &(impl AgentSessionExt + Sync), dids: Vec>, diff --git a/crates/jacquard/src/moderation/tests.rs b/crates/jacquard/src/moderation/tests.rs index 98fe3fd8b..912a019cc 100644 --- a/crates/jacquard/src/moderation/tests.rs +++ b/crates/jacquard/src/moderation/tests.rs @@ -707,7 +707,7 @@ fn test_moderatable_trait() { // Use the Moderateable trait with empty accepted_labelers to trust all labels let decisions = labeled_post.moderate_all(&prefs, &defs, &[]); - println!("Moderateable decisions for labeled post:"); + println!("Moderation decisions for labeled post:"); for (tag, decision) in &decisions { if !decision.causes.is_empty() { println!(