diff --git a/veza-chat-server/src/lib.rs b/veza-chat-server/src/lib.rs index 396199a15..e99d91f9a 100644 --- a/veza-chat-server/src/lib.rs +++ b/veza-chat-server/src/lib.rs @@ -5,6 +5,7 @@ pub mod config; pub mod database; pub mod delivered_status; +pub mod reactions; pub mod env; pub mod error; pub mod event_bus; diff --git a/veza-chat-server/src/main.rs b/veza-chat-server/src/main.rs index 05c501fb6..d8e2c21ab 100644 --- a/veza-chat-server/src/main.rs +++ b/veza-chat-server/src/main.rs @@ -277,8 +277,11 @@ async fn main() -> Result<(), ChatError> { "/ws", get({ let ws_state_clone = ws_state.clone(); - move |ws: WebSocketUpgrade, query: Query>| async move { - websocket_handler(ws, query, State(ws_state_clone)).await + move |ws: WebSocketUpgrade, + query: Query>, + request_id: Option>| + async move { + websocket_handler(ws, query, State(ws_state_clone), request_id).await } }), ) diff --git a/veza-chat-server/src/websocket/handler.rs b/veza-chat-server/src/websocket/handler.rs index 7b3b5afe7..1ebc1fa8e 100644 --- a/veza-chat-server/src/websocket/handler.rs +++ b/veza-chat-server/src/websocket/handler.rs @@ -14,7 +14,16 @@ use std::sync::Arc; use tracing::{debug, error, info, info_span, warn, Instrument}; use uuid::Uuid; +use crate::delivered_status::DeliveredStatusManager; +use crate::error::ChatError; +use crate::jwt_manager::{AccessTokenClaims, JwtManager}; +use crate::monitoring::ChatMetrics; use crate::reactions::ReactionsManager; +use crate::read_receipts::ReadReceiptManager; +use crate::repository::MessageRepository; +use crate::security::permission::PermissionService; +use crate::services::MessageEditService; +use crate::typing_indicator::TypingIndicatorManager; use crate::websocket::{IncomingMessage, OutgoingMessage, WebSocketClient, WebSocketManager}; /// État partagé pour le handler WebSocket @@ -872,7 +881,11 @@ async fn handle_incoming_message( // Récupérer l'historique let limit = limit.unwrap_or(50).min(100); - let (messages, has_more_before, has_more_after) = state + let (messages, has_more_before, has_more_after): ( + Vec, + bool, + bool, + ) = state .message_repo .fetch_history(conversation_id, before, after, limit, false) .await