fix: use .catch() in send-message IPC handler, remove redundant lambda

main
boksbc 2026-05-11 22:11:44 +02:00
parent c2479dc7ad
commit 82ca58738c
1 changed files with 4 additions and 7 deletions

View File

@ -28,14 +28,11 @@ app.whenReady().then(() => {
startWakeword({ onWake: showHud });
ipcMain.on('hide-hud', () => hideHud());
ipcMain.on('hide-hud', hideHud);
ipcMain.on('send-message', async (_, text) => {
try {
await axios.post(`${FOX_URL}/fox/message`, { text });
} catch (err) {
console.error('[Fox] send-message fehlgeschlagen:', err.message);
}
ipcMain.on('send-message', (_, text) => {
axios.post(`${FOX_URL}/fox/message`, { text })
.catch(err => console.error('[Fox] send-message fehlgeschlagen:', err.message));
});
ipcMain.handle('mac-command', async (_, command) => {