chore: More logging
All checks were successful
DCO checker / DCO checker (pull_request) Successful in 4s
Rust CI / Rust CI (pull_request) Successful in 4m28s

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-07-18 12:28:45 +03:00
parent 39e7861917
commit 6f0b88afb1
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F
3 changed files with 9 additions and 0 deletions

View file

@ -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,

View file

@ -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

View file

@ -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>,