diff options
author | Joas Schilling <coding@schilljs.com> | 2020-06-25 18:13:25 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-06-25 18:19:51 +0300 |
commit | c12ad5a49bc21788e1fa6de50906d60a3ed74dd5 (patch) | |
tree | 35028431b2e77ea7a97a9057bfa95034d7815a08 /lib | |
parent | b6a4db6eb0c09ea801a8a77cef830dbaf42a3288 (diff) |
More buffer to the key size
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Push.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Push.php b/lib/Push.php index 85de6a0..8e7c00e 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -317,9 +317,8 @@ class Push { 'id' => $notification->getObjectId(), ]; - // Max length of encryption is 255, so we need to make sure the subject is shorter. - // We also substract a buffer of 10 bytes. - $maxDataLength = 255 - strlen(json_encode($data)) - 10; + // Max length of encryption is ~240, so we need to make sure the subject is shorter. + $maxDataLength = 200 - strlen(json_encode($data)); $data['subject'] = $this->shortenJsonEncodedMultibyte($notification->getParsedSubject(), $maxDataLength); if ($notification->getParsedSubject() !== $data['subject']) { $data['subject'] .= '…'; |