From 598f0af1849ceea1d9c46bb753e35729e8060482 Mon Sep 17 00:00:00 2001 From: ceddybi Date: Tue, 5 Mar 2024 09:12:21 -0500 Subject: [PATCH] ipc:events --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index 74ab088..0940e2c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -374,6 +374,13 @@ ipcMain.handle('logout', async (event, ogLink) => { return true; }); +ipcMain.handle('events', async (event, args) => { + const { name, data } = args || {}; + if(!name || !data) return false; + appEvents.emit(name, data); + return true; +}); + ipcMain.handle('my-invokable-ipc', async (event, ...args) => { const state = await getState(); // const browser = await getBrowser();