Details
-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
-
None
-
None
Description
This line is wrong : https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/sender/APNsPushNotificationSender.java#L204 , we should multiply the ttl by 1000.
We workaround could be to update our doc to use miiliseconds but le't s stay in sync with APNS format that expects seconds.
also from the ML :
"
Please note also the other bug when sending -1 as ttl
(https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/sender/APNsPushNotificationSender.java#L201).
I think its discussable if this represents a bug in the apns java lib or on
aerogear side. Fact is however that it is severe and prevents messages from
beeing persistet on apns at all. Aerogear code could workaround it very
easily like that:
— instead of ----
return new Date(System.currentTimeMillis() +
EnhancedApnsNotification.MAXIMUM_EXPIRY * 1000L);
---- should change to —
return new Date(EnhancedApnsNotification.MAXIMUM_EXPIRY * 1000L);
—
Anything bigger than 'EnhancedApnsNotification.MAXIMUM_EXPIRY * 1000L' will
result in negative values sent to apns!
"