diff --git a/apps/desktop/src-tauri/src/chat.rs b/apps/desktop/src-tauri/src/chat.rs index b62f913..fbc610e 100644 --- a/apps/desktop/src-tauri/src/chat.rs +++ b/apps/desktop/src-tauri/src/chat.rs @@ -345,12 +345,14 @@ impl ChatRuntime { ); // Enviar notificacao nativa do Windows + // A janela de chat NAO abre automaticamente - + // o usuario deve clicar na notificacao ou no tray let notification_title = format!( "Chat iniciado - Chamado #{}", session.ticket_ref ); let notification_body = format!( - "{} iniciou um chat de suporte", + "{} iniciou um chat de suporte.\nClique no icone do Raven para abrir.", session.agent_name ); if let Err(e) = app @@ -364,16 +366,6 @@ impl ChatRuntime { "Falha ao enviar notificacao: {e}" ); } - - // Abrir janela de chat automaticamente - if let Err(e) = open_chat_window_internal( - &app, - &session.ticket_id, - ) { - crate::log_error!( - "Falha ao abrir janela de chat: {e}" - ); - } } } @@ -420,15 +412,7 @@ impl ChatRuntime { "Falha ao enviar notificacao de nova mensagem: {e}" ); } - - // Focar janela de chat se existir - if let Some(session) = result.sessions.first() { - let label = format!("chat-{}", session.ticket_id); - if let Some(window) = app.get_webview_window(&label) { - let _ = window.show(); - let _ = window.set_focus(); - } - } + // NAO foca a janela automaticamente - usuario abre manualmente } } } else {