summaryrefslogtreecommitdiff
path: root/webhook/src/handler/handler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'webhook/src/handler/handler.rs')
-rw-r--r--webhook/src/handler/handler.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/webhook/src/handler/handler.rs b/webhook/src/handler/handler.rs
index 4af2ba6..d482e01 100644
--- a/webhook/src/handler/handler.rs
+++ b/webhook/src/handler/handler.rs
@@ -17,12 +17,14 @@ use std::{
task::{Context, Poll},
time::Duration,
};
+use ed25519_dalek::PublicKey;
/// Hyper service used to handle the discord webhooks
#[derive(Clone)]
pub struct HandlerService {
pub config: Arc<Config>,
pub nats: Arc<Connection>,
+ pub public_key: Arc<PublicKey>
}
impl HandlerService {
@@ -36,7 +38,7 @@ impl HandlerService {
let contatenated_data = [timestamp.as_bytes().to_vec(), data.to_vec()].concat();
if let Ok(signature_str) = &signature.to_str() {
if validate_signature(
- &self.config.discord.public_key,
+ &self.public_key,
&contatenated_data,
signature_str,
) {