Skip to content

Commit aab3988

Browse files
committed
Also set the subject when the subject is not too long
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 73bdc21 commit aab3988

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Push.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ protected function encryptAndSign(Key $userKey, array $device, int $id, INotific
267267
$dataLength = 245 - strlen(json_encode($data));
268268
if (strlen($subject) > $dataLength) {
269269
$data['subject'] = substr($subject, 0, $dataLength) . '';
270+
} else {
271+
$data['subject'] = $subject;
270272
}
271273

272274
if ($isTalkNotification) {

0 commit comments

Comments
 (0)