This differential implements main <-> rendered IPC and uses it combined with decryption function from previous differential to decrypt notifications. In
summary notification decryption workflow is as follows:
- Desktop code in push-notifications.js receives notification and checks that it is encrypted (encryptedPayload) field.
- Sends decrypted payload to renderer process (web app) using onEncryptedNotification IPC.
- Renderer receives it in callback registered in push-notifs-handler.js in web code. In this callback it decrypts payload using decryptDesktopNotification
function.
- Decrypted notification is sent to main process using showDecryptedNotification IPC.
- Main process receives decrypted notification in ipcMain.on('show-decrypted-notification', (...) => {...}) where it shows notification.