Skip to content

Commit

Permalink
Merge pull request #414 from nextcloud/bugfix/413/empty-subject-data
Browse files Browse the repository at this point in the history
Also set the subject when the subject is not too long
  • Loading branch information
nickvergessen authored Aug 22, 2019
2 parents 73bdc21 + aab3988 commit dcf452b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Push.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,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) {
Expand Down

0 comments on commit dcf452b

Please sign in to comment.