Implement stateful and deferrable notification decryption and use it on iOS in NSE
Summary:
This differential implements additional methods in NotificationsCryptoModule that are stateful so that we cen decrypt notification and decide to upda te
notification olm file later. This is necessary to test potential theory that BAD_MESSAGE_MAC error stems from NSE callback being retried by iOS before the first run
calls contentHandler but correctly decrypts notification.
Test Plan:
- Add this method to NotificationsCryptoModule.cpp: https://gist.github.com/marcinwasowicz/f81464d953894bb65f7fd0a891f7def8
- Call it inn NSE before decryption and after decryption. In both cases log the result.
- Send two notifications.
- Examine console logs from NSE.
- Ensure that the second pretty print of olm file for the first notification is the same as the first pretty print for the second notification. This will ensure that the file was indeed updated.
Reviewers: tomek, ashoat, bartek
Reviewed By: ashoat
Subscribers: wyilio
Differential Revision: https://phab.comm.dev/D9401