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)
Sat, Nov 2, 3:22 AM
Unknown Object (File)
Sat, Nov 2, 3:22 AM
Unknown Object (File)
Sat, Nov 2, 3:22 AM
Unknown Object (File)
Sat, Nov 2, 3:08 AM
Unknown Object (File)
Oct 10 2024, 8:58 AM
Unknown Object (File)
Oct 10 2024, 8:58 AM
Unknown Object (File)
Oct 10 2024, 8:58 AM
Unknown Object (File)
Oct 10 2024, 8:57 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