HomePhabricator
Diffusion Comm 0f9ba5189730

Encrypt notifications for MacOS clients with code versions supporting…

Description

Encrypt notifications for MacOS clients with code versions supporting notification decryption

Summary:
This differential checks for MacOS client code versions and encrypts notification if both are sufficiently high. Additionaly some other places in the code
are updated to pass information on major desktop version to functions responsible for notification preparation.

Test Plan:

  1. Build desktop app.
  2. Send a couple of notifications (visual and badge only). Ensure that they are displayed/ badge icon is updated. Ensure that no session in olm_sessions table in MariaDB increments its version.
  3. Update NEXT_CODE_VERSION -> 0.
  4. Repeat step 2. This time ensure that there is an entry in olm_sessions table that increments its version with each notification. Obviously ensure that notifications are working correctly (displayed in decrypted form and updating badge icon).
  5. Finally, bring NEXT_CODE_VERSION back to its original value and repeat step 2. Ensure that notifications work correctly but the session that was incrementing its version in step 4 doesn't do so anymore.

Reviewers: kamil, michal

Reviewed By: michal

Subscribers: ashoat, tomek

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