diff options
author | Joas Schilling <coding@schilljs.com> | 2018-07-09 17:47:36 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-07-09 17:47:36 +0300 |
commit | 9d8071de6542740f17520d50882f337f7352a79e (patch) | |
tree | 9a42816f2adc0a668fd9a641f4fd816f106db201 | |
parent | 31a71bd54bb76fd8d359315dde7ffcc615ea1958 (diff) |
Always push the object data
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/Push.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Push.php b/lib/Push.php index 0c55aa0..1213d7f 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -186,13 +186,10 @@ class Push { $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'); |