Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-07-09 17:47:36 +0300
committerJoas Schilling <coding@schilljs.com>2018-07-09 17:47:36 +0300
commit9d8071de6542740f17520d50882f337f7352a79e (patch)
tree9a42816f2adc0a668fd9a641f4fd816f106db201 /lib
parent31a71bd54bb76fd8d359315dde7ffcc615ea1958 (diff)
Always push the object data
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Push.php7
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');