This differential refactors web notification decryption code so that the part that is common for web and desktop is extracted to separate function and other
functions that are specific for web and desktop are implemented.
Details
Details
- Test that web notifications are unbroken.
- Testing desktop notifications is not possible without IPC boilerplate that will be introduced in future diffs.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
web/push-notif/notif-crypto-utils.js | ||
---|---|---|
109 ↗ | (On Diff #33573) |
|
web/push-notif/notif-crypto-utils.js | ||
---|---|---|
109 ↗ | (On Diff #33573) |
On web this code runs in service-worker context where olmFilename variable is not automatically populated. On desktop however this code is going to execute in main web thread so we can use initOlm as we do in other places in web.
We can await in parallel with previous promises for desktop. We can't do so for web since path to WASM file is retrieved from localforage in previous promises. |
web/push-notif/notif-crypto-utils.js | ||
---|---|---|
109 ↗ | (On Diff #33573) | Makes sense, so let's await in parallel for desktop. |