diff --git a/src/setup/channels.rs b/src/setup/channels.rs index 1c184b0b..2612076d 100644 --- a/src/setup/channels.rs +++ b/src/setup/channels.rs @@ -518,7 +518,7 @@ pub async fn setup_http(secrets: &SecretsContext) -> Result String { generate_secret_with_length(32) } +fn http_webhook_secret_hint() -> &'static str { + "The secret is stored in the encrypted secrets database and will be loaded automatically on startup." +} + fn validate_e164(account: &str) -> Result<(), String> { if !account.starts_with('+') { return Err("E.164 account must start with '+'".to_string()); @@ -1136,8 +1140,9 @@ mod tests { use crate::secrets::{InMemorySecretsStore, SecretsCrypto, SecretsStore}; use crate::setup::channels::{ - SecretsContext, generate_webhook_secret, substitute_validation_placeholders, - validate_cloudflare_token_format, validate_public_https_url, + SecretsContext, generate_webhook_secret, http_webhook_secret_hint, + substitute_validation_placeholders, validate_cloudflare_token_format, + validate_public_https_url, }; fn test_secrets_context() -> SecretsContext { @@ -1337,4 +1342,12 @@ mod tests { .to_string(); assert!(err.contains("DNS resolution failed")); } + + #[test] + fn test_http_webhook_secret_hint_reflects_current_behavior() { + let hint = http_webhook_secret_hint(); + assert!(hint.contains("encrypted secrets database")); + assert!(hint.contains("loaded automatically on startup")); + assert!(!hint.contains("ironclaw secret get")); + } }