From aa493426b06ccf54d034299e65353a0a4dc6343b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 22 Aug 2019 11:14:39 +0200 Subject: [PATCH] Also set the subject when the subject is not too long Signed-off-by: Joas Schilling --- lib/Push.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Push.php b/lib/Push.php index a9cca15d5..e5f3e311f 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -197,6 +197,8 @@ protected function encryptAndSign(Key $userKey, array $device, int $id, INotific $dataLength = 245 - strlen(json_encode($data)); if (strlen($subject) > $dataLength) { $data['subject'] = substr($subject, 0, $dataLength) . '…'; + } else { + $data['subject'] = $subject; } if ($isTalkNotification) {