diff --git a/crates/oxidetalis/src/database/user_status.rs b/crates/oxidetalis/src/database/user_status.rs index 47d9303..1997332 100644 --- a/crates/oxidetalis/src/database/user_status.rs +++ b/crates/oxidetalis/src/database/user_status.rs @@ -98,6 +98,7 @@ pub trait UsersStatusExt { } impl UsersStatusExt for DatabaseConnection { + #[logcall::logcall] async fn is_whitelisted( &self, whitelister: &UserModel, @@ -114,6 +115,7 @@ impl UsersStatusExt for DatabaseConnection { .map_err(Into::into) } + #[logcall::logcall] async fn is_blacklisted( &self, blacklister: &UserModel, @@ -130,6 +132,7 @@ impl UsersStatusExt for DatabaseConnection { .map_err(Into::into) } + #[logcall::logcall] async fn add_to_whitelist( &self, whitelister: &UserModel, @@ -172,6 +175,7 @@ impl UsersStatusExt for DatabaseConnection { Ok(()) } + #[logcall::logcall] async fn add_to_blacklist( &self, blacklister: &UserModel, @@ -214,6 +218,7 @@ impl UsersStatusExt for DatabaseConnection { Ok(()) } + #[logcall::logcall] async fn remove_from_whitelist( &self, whitelister: &UserModel, @@ -232,6 +237,7 @@ impl UsersStatusExt for DatabaseConnection { Ok(()) } + #[logcall::logcall] async fn remove_from_blacklist( &self, blacklister: &UserModel, diff --git a/crates/oxidetalis/src/websocket/events/server.rs b/crates/oxidetalis/src/websocket/events/server.rs index 6629487..6295891 100644 --- a/crates/oxidetalis/src/websocket/events/server.rs +++ b/crates/oxidetalis/src/websocket/events/server.rs @@ -31,6 +31,7 @@ use crate::websocket::errors::WsError; /// Signed marker, used to indicate that the event is signed pub struct Signed; /// Unsigned marker, used to indicate that the event is unsigned +#[derive(Debug)] pub struct Unsigned; /// Server websocket event diff --git a/crates/oxidetalis/src/websocket/handlers/chat_request.rs b/crates/oxidetalis/src/websocket/handlers/chat_request.rs index 6d0aa2a..bb8639c 100644 --- a/crates/oxidetalis/src/websocket/handlers/chat_request.rs +++ b/crates/oxidetalis/src/websocket/handlers/chat_request.rs @@ -32,6 +32,7 @@ use crate::{ }; /// Handle a chat request from a user. +#[logcall::logcall] pub async fn handle_chat_request( db: &DatabaseConnection, from: Option<&UserModel>, @@ -78,6 +79,7 @@ pub async fn handle_chat_request( None } +#[logcall::logcall] pub async fn handle_chat_response( db: &DatabaseConnection, recipient: Option<&UserModel>,