diff --git a/src/activitypub/inbox.rs b/src/activitypub/inbox.rs index 4491e66..03c29c3 100644 --- a/src/activitypub/inbox.rs +++ b/src/activitypub/inbox.rs @@ -267,7 +267,7 @@ async fn send_accept( Ok(()) } -const ACCEPT_NON_PUBLIC_NOTES: bool = !cfg!(debug_assertions); +const ACCEPT_NON_PUBLIC_NOTES: bool = cfg!(debug_assertions); async fn handle_create_note( _create: AcceptedActivity, diff --git a/src/activitypub/mod.rs b/src/activitypub/mod.rs index 47774d5..85fe939 100644 --- a/src/activitypub/mod.rs +++ b/src/activitypub/mod.rs @@ -53,7 +53,7 @@ pub fn conversation_context() -> AnyBase { .unwrap() } -const ACCEPT_INVALID_CERTS: bool = !cfg!(debug_assertions); +const ACCEPT_INVALID_CERTS: bool = cfg!(debug_assertions); pub static CLIENT: Lazy = Lazy::new(|| { if ACCEPT_INVALID_CERTS { warn!("Accepting invalid certs for ActivityPub request"); diff --git a/src/generator/css.rs b/src/generator/css.rs index fe21ad9..be56263 100644 --- a/src/generator/css.rs +++ b/src/generator/css.rs @@ -8,9 +8,9 @@ const CHARSET: &'static str = r#"@charset "UTF-8";"#; pub fn generate() -> anyhow::Result<()> { let format = Format { style: if cfg!(debug_assertions) { - Style::Compressed - } else { Style::Expanded + } else { + Style::Compressed }, precision: 3, }; diff --git a/src/main.rs b/src/main.rs index e0cbbdd..193cfa0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,9 +43,9 @@ async fn main() { .get_matches(); if cfg!(debug_assertions) { - info!("Running in release mode"); - } else { info!("Running in dev mode"); + } else { + info!("Running in release mode"); } match matches.subcommand() { @@ -77,11 +77,11 @@ async fn main() { let sched = JobScheduler::new().await.expect("create JobScheduler"); let digest_schedule = if cfg!(debug_assertions) { - // every day at midnight utc - "0 0 0 * * * *" - } else { // every 5 minutes in debug "0 1/5 * * * *" + } else { + // every day at midnight utc + "0 0 0 * * * *" }; let pool_ = pool.clone(); sched