fix(chat): restore compilation - add reactions module, imports, request_id param
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d534c4e857
commit
fde65e11dc
3 changed files with 20 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -277,8 +277,11 @@ async fn main() -> Result<(), ChatError> {
|
|||
"/ws",
|
||||
get({
|
||||
let ws_state_clone = ws_state.clone();
|
||||
move |ws: WebSocketUpgrade, query: Query<HashMap<String, String>>| async move {
|
||||
websocket_handler(ws, query, State(ws_state_clone)).await
|
||||
move |ws: WebSocketUpgrade,
|
||||
query: Query<HashMap<String, String>>,
|
||||
request_id: Option<Extension<Uuid>>|
|
||||
async move {
|
||||
websocket_handler(ws, query, State(ws_state_clone), request_id).await
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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<crate::models::message::Message>,
|
||||
bool,
|
||||
bool,
|
||||
) = state
|
||||
.message_repo
|
||||
.fetch_history(conversation_id, before, after, limit, false)
|
||||
.await
|
||||
|
|
|
|||
Loading…
Reference in a new issue