Fixed Web Push: Time To Live option is called "TTL" not "ttl"

Steffen

Well-known member
Affected version
2.1 RC1
According to the readme file as well as the code, the option is called TTL not ttl. :)

Diff:
--- a/src/XF/Service/PushNotification.php
+++ b/src/XF/Service/PushNotification.php
@@ -127,7 +127,7 @@ class PushNotification extends AbstractService
         $webPush = $this->getWebPushObject();
 
         $webPush->setDefaultOptions([
-            'ttl' => 86400, // if undelivered after 1 day, expire the notification
+            'TTL' => 86400, // if undelivered after 1 day, expire the notification
         ]);
 
         $subscriptions = $this->getReceiverSubscriptions();
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.0 RC2).

Change log:
Ensure TTL option is passed through to the web push endpoint correctly.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom