diff --git a/src/server/mod.rs b/src/server/mod.rs index 46bfbd9..1b53cc4 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -6,4 +6,5 @@ pub mod websockets; pub const DEAUTH_EVENT: &str = "nexus://com.reboot-codes.nexus/websockets/deauthorize"; pub const AUTH_HEADER: &str = "Authorization"; -pub const MAX_SIZE: usize = 8388608; +/// Max amount of messages for all broadcast channels.... please keep low. +pub const MAX_SIZE: usize = 256; diff --git a/src/user/mod.rs b/src/user/mod.rs index 2e156a6..b7664ee 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -7,7 +7,7 @@ use crate::{ websockets::WsIn, }, }; -use log::error; +use log::{debug, error}; use regex::Regex; use std::sync::Arc; use tokio::{ @@ -91,6 +91,7 @@ impl NexusUser { match Regex::new(&allowed_event_regex) { Ok(regex) => { if regex.is_match(&message.kind.clone()) { + debug!("Sending event to user: {}...", this.api_key.user_id.clone(),); match tx.clone().send(message.clone()) { Ok(_) => {} Err(e) => {