From 691a733fc37cfba5d9be72b57e24c5b9d3c1218a Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 29 Jul 2024 07:51:09 +0100 Subject: [PATCH] fix: webhook secret doesn't need to be base64 encoded Closes kemitix/git-next#118 --- crates/cli/src/server/actor/handlers/notify_user.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/cli/src/server/actor/handlers/notify_user.rs b/crates/cli/src/server/actor/handlers/notify_user.rs index 38cf9ff0..85c5102e 100644 --- a/crates/cli/src/server/actor/handlers/notify_user.rs +++ b/crates/cli/src/server/actor/handlers/notify_user.rs @@ -39,7 +39,9 @@ async fn send_webhook( tracing::warn!("Invalid notification configuration (config) - can't sent notification"); return; }; - let Ok(webhook) = Webhook::new(webhook_config.secret().expose_secret()) else { + let Ok(webhook) = + Webhook::from_bytes(webhook_config.secret().expose_secret().as_bytes().into()) + else { tracing::warn!("Invalid notification configuration (signer) - can't sent notification"); return; };