From 08e5c272b79e7d7b4cf7a45e6170dd7bd056baaa Mon Sep 17 00:00:00 2001 From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> Date: Fri, 2 Sep 2022 17:26:46 +0000 Subject: [PATCH] Fix nil argument when processing remote notification --- Signal/src/AppDelegate.m | 2 +- Signal/src/AppDelegate.swift | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index e8a3fe7b1a..5fa6195993 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -302,7 +302,7 @@ static void uncaughtExceptionHandler(NSException *exception) NSDictionary *remoteNotification = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey]; if (remoteNotification) { OWSLogInfo(@"Application was launched by tapping a push notification."); - [self processRemoteNotification:remoteNotification completion:nil]; + [self processRemoteNotification:remoteNotification]; } [OWSScreenLockUI.shared setupWithRootWindow:self.window]; diff --git a/Signal/src/AppDelegate.swift b/Signal/src/AppDelegate.swift index f9e5e0a832..b8d2565d36 100644 --- a/Signal/src/AppDelegate.swift +++ b/Signal/src/AppDelegate.swift @@ -233,7 +233,12 @@ extension AppDelegate { } @objc - func processRemoteNotification(_ remoteNotification: NSDictionary, completion: @escaping () -> Void = {}) { + func processRemoteNotification(_ remoteNotification: NSDictionary) { + processRemoteNotification(remoteNotification) {} + } + + @objc + func processRemoteNotification(_ remoteNotification: NSDictionary, completion: @escaping () -> Void) { AssertIsOnMainThread() guard !didAppLaunchFail else {