Introduce fallback mechanism for notifications decryption if MMKV initialization hasn't been executed yet.
Summary:
This differential fixes: https://linear.app/comm/issue/ENG-7309/nse-received-c-exception-nse-cant-initialize-mmkv-encryption-key. If decryption with session
stored in MMKV failes (since MMKV wasn't initialized yet) we try to use previous file-based session.
Test Plan:
- Revert this diff and the diff that migrates notifs session to MMKV. For the second reosolve the conflicts by making migration 38 a no-op.
- Build the app and log in. This puts the app in legacy notifications state - notifications session is created in a flat file.
- Reset reveerts, build the app again and send notifications.
- Ensure notifications are working since the fallback mechanism uses old session.
- Log out and log in again. Ensure that notifs are still working - new approach is working as well.
Reviewers: tomek, bartek, kamil
Reviewed By: kamil
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D11541