Skip to content

Commit

Permalink
Call "flushState" after calling "contentHandler" in the NSE.
Browse files Browse the repository at this point in the history
Summary:
This differential places a call to "flushState" after a call to "contentHandler" to handle the possibility that the NSE restarts notification processing
before calling "contentHandler"

Test Plan:
Add ling with logging just after the line that calls "contentHandler". Build iOS app and sends some notifications ensure that logging line is called at
least every 4 - 5 notifications.

Reviewers: tomek, ashoat

Reviewed By: ashoat

Subscribers: wyilio

Differential Revision: https://phab.comm.dev/D9822
  • Loading branch information
marcinwasowicz committed Nov 13, 2023
1 parent af77993 commit 0e7e1f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions native/ios/NotificationService/NotificationService.mm
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,13 @@ - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request
return;
}

[self callContentHandlerForKey:contentHandlerKey
withContent:publicUserContent];

if (decryptionExecuted) {
comm::NotificationsCryptoModule::flushState(
std::move(statefulDecryptResultPtr), callingProcessName);
}

[self callContentHandlerForKey:contentHandlerKey
withContent:publicUserContent];
}

- (void)serviceExtensionTimeWillExpire {
Expand Down

0 comments on commit 0e7e1f9

Please sign in to comment.