{"action":"closed","issue":{"url":"https://api.github.com/repos/Pr0Ger/PyAPNs2/issues/50","repository_url":"https://api.github.com/repos/Pr0Ger/PyAPNs2","labels_url":"https://api.github.com/repos/Pr0Ger/PyAPNs2/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/Pr0Ger/PyAPNs2/issues/50/comments","events_url":"https://api.github.com/repos/Pr0Ger/PyAPNs2/issues/50/events","html_url":"https://github.com/Pr0Ger/PyAPNs2/issues/50","id":246510162,"number":50,"title":"'apns-expiration' header is not honoured","user":{"login":"subhadipghoshal","id":8099518,"avatar_url":"https://avatars1.githubusercontent.com/u/8099518?v=4","gravatar_id":"","url":"https://api.github.com/users/subhadipghoshal","html_url":"https://github.com/subhadipghoshal","followers_url":"https://api.github.com/users/subhadipghoshal/followers","following_url":"https://api.github.com/users/subhadipghoshal/following{/other_user}","gists_url":"https://api.github.com/users/subhadipghoshal/gists{/gist_id}","starred_url":"https://api.github.com/users/subhadipghoshal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subhadipghoshal/subscriptions","organizations_url":"https://api.github.com/users/subhadipghoshal/orgs","repos_url":"https://api.github.com/users/subhadipghoshal/repos","events_url":"https://api.github.com/users/subhadipghoshal/events{/privacy}","received_events_url":"https://api.github.com/users/subhadipghoshal/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-29T09:06:11Z","updated_at":"2018-04-16T21:00:05Z","closed_at":"2018-04-16T21:00:05Z","author_association":"NONE","body":"We have been using this client to send notifications through APNS to iPhones. \r\n\r\nHere is the client and the send_notification function\r\n\r\n`apns_client = APNsClient(settings.APNS_CERT_PATH, use_sandbox=True, use_alternative_port=False)`\r\n`results = apns_client.send_notification_batch(notifications, APPID_IOS, expiration=ttl, collapse_id=apns_collapse_id)`\r\n\r\nWe have a specific requirement where we require the notification to be expired 45 seconds post sending. However, the expiration time as such is not honoured. We ran a test scenario where we sent a notification to a device while it was offline, and we brought it up online after 55 seconds. The notification still reached, even though the expiration time was set at 45 seconds. \r\n\r\nAlong with that, we have also been experimenting with notifications with apns-expiration = 0. According to Apple's documentation\r\n\r\n> If the value is 0, APNs treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it.\r\n\r\nHowever, when we sent out a notification to a device which we brought online 10 seconds after sending it out, the notification still reached, even though expiration was set to zero. \r\n\r\nIs there something we are missing? Or is it something on the side of APNS? Any help would be greatly appreciated.\r\n\r\nThanks in advance.\r\n\r\nPython Version - 3.5.1\r\n\r\n"}}
{"actor":{"display_login":"Pr0Ger"}}