diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2020-02-11 16:55:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 16:55:13 +0300 |
commit | e2d4603b7c9b08c35635cef8873a266ab2880b4a (patch) | |
tree | 57eac6dac5f20e9e90cab068edfb62f35d430b80 | |
parent | 8fa5c276549456b9cafefec537220d686bbb71b8 (diff) | |
parent | 8f8ff2588bfeec2db68fb02cc4b853b19e171998 (diff) |
Merge pull request #565 from nextcloud/backport/557/stable18v18.0.1
[stable18] Support Strict VoIP push notifications for iOS 13 SDK
-rw-r--r-- | lib/Push.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Push.php b/lib/Push.php index 810a003..441746f 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -274,8 +274,10 @@ class Push { if ($isTalkNotification) { $priority = 'high'; + $type = $data['type'] === 'call' ? 'voip' : 'alert'; } else { $priority = 'normal'; + $type = 'alert'; } if (!openssl_public_encrypt(json_encode($data), $encryptedSubject, $device['devicepublickey'], OPENSSL_PKCS1_PADDING)) { @@ -293,6 +295,7 @@ class Push { 'subject' => $base64EncryptedSubject, 'signature' => $base64Signature, 'priority' => $priority, + 'type' => $type, ]; } @@ -334,6 +337,7 @@ class Push { 'subject' => $base64EncryptedSubject, 'signature' => $base64Signature, 'priority' => 'normal', + 'type' => 'background', ]; } |