Skip to content

Commit 186a3be

Browse files
committed
Fix Firefox Android bug
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent f60e015 commit 186a3be

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- New: Added an enable push subscriptions toggle switch to the footer of the Notifications drop down.
66
- Fixed an issue where the Subscribe button was appearing on some UCP pages unexpectedly.
7+
- Fixed an issue where push notifications failed on Android devices using Firefox as their browser.
78
- Requires phpBB 3.3.12 or newer.
89

910
### 1.0.0-RC4 - 2024-05-26

notification/method/webpush.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ protected function notify_using_webpush(): void
194194

195195
$web_push = new \Minishlink\WebPush\WebPush($auth);
196196

197+
// Fix encryption payload size for Firefox on Android
198+
if (preg_match('/android.*firefox/i', $this->user->browser))
199+
{
200+
$web_push->setAutomaticPadding(2820);
201+
}
202+
197203
$number_of_notifications = 0;
198204
$remove_subscriptions = [];
199205

0 commit comments

Comments
 (0)