Page MenuHomePhabricator

Fix broken keyserver-based notifs when shared worker is behind service worker
ClosedPublic

Authored by marcin on Aug 7 2024, 9:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 8:36 PM
Unknown Object (File)
Wed, Nov 13, 8:24 PM
Unknown Object (File)
Tue, Nov 12, 4:46 PM
Unknown Object (File)
Sun, Nov 10, 11:31 AM
Unknown Object (File)
Sun, Nov 10, 9:26 AM
Unknown Object (File)
Sun, Nov 10, 9:25 AM
Unknown Object (File)
Sun, Nov 10, 9:00 AM
Unknown Object (File)
Sat, Nov 2, 3:22 AM
Subscribers

Details

Summary

This differential fixes https://linear.app/comm/issue/ENG-8987/web-notifs-became-broken-on-prod. There is no need to throw if there is no notiufs account in IndexedDB when decrypting keyserver notif since it is not necessary to potentially create session. Peer-based notifs have other checks in the code that will throw if there is no notifs account in indexeddb.

Test Plan
  1. Before this diff remove notificationAccount entry in IndexedDB. Send notif. Expect broken one.
  2. Apply this diff and remove notificationAccount entry in IndexedDB. Send notif. Expect correct one.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

web/push-notif/notif-crypto-utils.js
210–215 ↗(On Diff #43221)

This check was never necessary. It was an artifact that I left before modifying the type of getNotifsAccountWithOlmData to return optional notif account.

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 7 2024, 9:47 AM
Harbormaster failed remote builds in B30981: Diff 43221!
marcin requested review of this revision.Aug 7 2024, 9:51 AM
This revision is now accepted and ready to land.Aug 7 2024, 10:04 AM