Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
bug: APNs library requires parameters to be strings
Browse files Browse the repository at this point in the history
closes #797
  • Loading branch information
jrconlin committed Feb 6, 2017
1 parent d537fd8 commit 5348820
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions autopush/router/apns2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
SANDBOX = 'api.development.push.apple.com'
SERVER = 'api.push.apple.com'

APNS_PRIORITY_IMMEDIATE = 10
APNS_PRIORITY_LOW = 5
APNS_PRIORITY_IMMEDIATE = '10'
APNS_PRIORITY_LOW = '5'
APNS_MAX_CONNECTIONS = 20


Expand Down Expand Up @@ -107,7 +107,7 @@ def send(self, router_token, payload, apns_id,
'apns-topic': topic or self.topic,
}
if exp:
headers['apns-expiration'] = exp
headers['apns-expiration'] = str('exp')
url = '/3/device/' + router_token
connection = self._get_connection()
try:
Expand Down
2 changes: 1 addition & 1 deletion autopush/tests/test_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def test_route_low_priority_notification(self):
headers = body['headers']
eq_(headers, {'apns-expiration': exp,
'apns-topic': 'com.example.SomeApp',
'apns-priority': 5,
'apns-priority': '5',
'apns-id': 'apnsid'})

@inlineCallbacks
Expand Down

0 comments on commit 5348820

Please sign in to comment.