From 3d904813eaddc5e88edd11e4b1959033b5cd62ec Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 9 Jul 2018 16:47:36 +0200 Subject: [PATCH] Always push the object data Signed-off-by: Joas Schilling --- lib/Push.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Push.php b/lib/Push.php index f9e1b2bd5..45ea67615 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -184,13 +184,10 @@ protected function encryptAndSign(Key $userKey, array $device, INotification $no $data = [ 'app' => $notification->getApp(), 'subject' => $notification->getParsedSubject(), + 'type' => $notification->getObjectType(), + 'id' => $notification->getObjectId(), ]; - if ($isTalkNotification) { - $data['type'] = $notification->getObjectType(); - $data['id'] = $notification->getObjectId(); - } - if (!openssl_public_encrypt(json_encode($data), $encryptedSubject, $device['devicepublickey'], OPENSSL_PKCS1_PADDING)) { $this->log->error(openssl_error_string(), ['app' => 'notifications']); throw new \InvalidArgumentException('Failed to encrypt message for device');