From 75deb77f201eeca796add7adec269b80655eaa83 Mon Sep 17 00:00:00 2001 From: Pierre Marx Date: Wed, 18 Mar 2026 22:42:47 -0400 Subject: [PATCH] refactor: supprimer handlers IPC orphelins (closes #17) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit simulate-call, get-simulated-calls et is-development étaient des restes de cti-simulator.js supprimé — plus appelés depuis renderer.js. --- main.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/main.js b/main.js index 1006e36..f1d5476 100644 --- a/main.js +++ b/main.js @@ -585,22 +585,6 @@ ipcMain.handle('get-current-agent', () => { }; }); -ipcMain.handle('simulate-call', (event, callData) => { - mainWindow.webContents.send('incoming-call', callData); - return { success: true }; -}); - -ipcMain.handle('get-simulated-calls', () => { - if (!config.cti || !config.cti.appelSimules) return []; - return config.cti.appelSimules.map(appel => { - const centre = config.centres ? config.centres.find(c => c.id === appel.centreId) : null; - return { - ...appel, - centreNom: centre ? centre.nom : 'Centre inconnu' - }; - }); -}); - // Sauvegarder les notes de l'agent ipcMain.handle('save-notes', (event, noteData) => { const notesDir = path.join(__dirname, 'notes'); @@ -691,7 +675,3 @@ ipcMain.handle('save-call-history', (event, callData) => { fs.writeFileSync(historyFile, JSON.stringify(history, null, 2)); return { success: true }; }); - -ipcMain.handle('is-development', () => { - return process.env.NODE_ENV === 'development'; -});