From f735956f8d0f1bc89184ba96c8075985a961dc3f Mon Sep 17 00:00:00 2001 From: Angel Velasquez Date: Sun, 17 Nov 2019 12:14:13 -0500 Subject: [PATCH] Try @edamov's suggestion on #78 --- src/Request.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Request.php b/src/Request.php index e4ccee9..ac618c1 100644 --- a/src/Request.php +++ b/src/Request.php @@ -237,16 +237,9 @@ private function prepareApnsHeaders(Notification $notification) } // new header required to support iOS 13 $this->headers[self::HEADER_APNS_PUSH_TYPE] = 'alert'; - $payload = $notification->getPayload(); - try { - $apnsTopic = $payload->getCustomValue(self::HEADER_APNS_TOPIC); - } catch (InvalidPayloadException $e) { - } if ($notification->getPayload()->isContentAvailable()) { $this->headers[self::HEADER_APNS_PUSH_TYPE] = 'background'; - } - if (isset($apnsTopic) && !empty($apnsTopic)) { - $this->headers[self::HEADER_APNS_TOPIC] = $apnsTopic; + } elseif (isset($this->headers[self::HEADER_APNS_TOPIC])) { $this->headers[self::HEADER_APNS_PUSH_TYPE] = 'voip'; } }