1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-18 22:41:28 +02:00

[ticket/17321] Add versioning to push worker to force updates

PHPBB-17321
This commit is contained in:
Marc Alexander
2024-06-02 21:35:16 +02:00
parent a7b4f035a4
commit d499850532
3 changed files with 23 additions and 1 deletions

View File

@@ -210,6 +210,7 @@ class webpush extends messenger_base implements extended_method_interface
$data = [
'item_id' => $notification->item_id,
'type_id' => $notification->notification_type_id,
'version' => $this->config['assets_version'],
];
$json_data = json_encode($data);

View File

@@ -138,6 +138,7 @@ class webpush
// @todo: only work for logged in users, no anonymous & bot
$content = $this->template->render('push_worker.js.twig', [
'U_WEBPUSH_GET_NOTIFICATION' => $this->controller_helper->route('phpbb_ucp_push_get_notification_controller'),
'ASSETS_VERSION' => $this->config['assets_version'],
]);
$response = new Response($content);