diff --git a/desktop/main.js b/desktop/main.js index 2fe5089..61ae564 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -72,9 +72,9 @@ function snoreExe() { } catch (_) {} return null; } -// Direct SnoreToast with -w so it waits and writes the reply to our pipe. Rejects if the binary -// is missing or fails to show a toast (so the caller can fall back). Args match node-notifier's -// known-good set + -w (no -application, which broke the toast). +// Direct SnoreToast: with -pipeName it blocks and waits for the interaction on its own, then +// writes the result (incl. the typed reply) to our pipe (do NOT pass -w — it fails on this +// build; and no -application). Rejects if the binary is missing/fails so the caller can fall back. function directToast(payload, img) { return new Promise((resolve, reject) => { const exe = snoreExe(); @@ -85,7 +85,7 @@ function directToast(payload, img) { server = net.createServer((sock) => { sock.on('data', (d) => { raw = Buffer.concat([raw, d]); }); }); server.on('error', (e) => settle(reject, e)); server.listen(pipe, () => { - const args = ['-appID', APP_ID, '-tb', '-w', '-pipeName', pipe]; + const args = ['-appID', APP_ID, '-tb', '-pipeName', pipe]; if (img) args.push('-p', img); args.push('-m', payload.body || ' ', '-t', payload.title || 'Biz Connect'); const child = spawn(exe, args, { windowsHide: true });