diff --git a/surfsense_desktop/src/modules/quick-ask.ts b/surfsense_desktop/src/modules/quick-ask.ts index 3bee2bbc2..3e8f29bc7 100644 --- a/surfsense_desktop/src/modules/quick-ask.ts +++ b/surfsense_desktop/src/modules/quick-ask.ts @@ -1,4 +1,4 @@ -import { BrowserWindow, clipboard, globalShortcut, ipcMain, screen, shell } from 'electron'; +import { BrowserWindow, clipboard, globalShortcut, ipcMain, screen, shell, systemPreferences } from 'electron'; import { execSync } from 'child_process'; import path from 'path'; import { IPC_CHANNELS } from '../ipc/channels'; @@ -122,6 +122,8 @@ export function registerQuickAsk(): void { ipcMain.handle(IPC_CHANNELS.REPLACE_TEXT, async (_event, text: string) => { if (process.platform !== 'darwin' || !sourceApp) return; + if (!systemPreferences.isTrustedAccessibilityClient(true)) return; + clipboard.writeText(text); hideQuickAsk();