HomePhabricator
Diffusion Comm 29b725af6115

Implement inbound notif session creation from the NSE with race condition…

Description

Implement inbound notif session creation from the NSE with race condition handling

Summary: This differential implements inbound notification session creation with race condition handling. The NSE code is modified to use this mechanism when receiving E2EE notification from peer. Android part in CommNotificationsHandler.java will be added shortly after Tunnelbroker <-> FCM diff is out.

Test Plan:

  1. Apply this patch: https://gist.github.com/marcinwasowicz/8bdc755abad8ecf81f3bd01c6ca34376
  2. Send notification from web to iOS device.
  3. Ensure that each notification results in two identical notification being displayed. One is from the keyserver. The other is from tunnelbroker and is E2EE encrypted.
  4. I also added some logs in NotificationsCryptoModule so that it is logged whether we create new session or use existing one. I only saw the first type of log once.

Reviewers: tomek, kamil, bartek

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D12750

Details