Skip to content

Commit 833b00f

Browse files
authored
Merge pull request djacobs#196 from ChaosTong/master
add title and subtile params for iOS 10
2 parents a281ab3 + 3528ec2 commit 833b00f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

apns.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,27 @@ def write(self, string):
268268

269269

270270
class PayloadAlert(object):
271-
def __init__(self, body=None, action_loc_key=None, loc_key=None,
271+
def __init__(self, body=None, title = None, subtitle = None, action_loc_key=None, loc_key=None,
272272
loc_args=None, launch_image=None):
273273
super(PayloadAlert, self).__init__()
274+
274275
self.body = body
276+
self.title = title
277+
self.subtitle = subtitle
275278
self.action_loc_key = action_loc_key
276279
self.loc_key = loc_key
277280
self.loc_args = loc_args
278281
self.launch_image = launch_image
279282

280283
def dict(self):
281284
d = {}
285+
282286
if self.body:
283287
d['body'] = self.body
288+
if self.title:
289+
d['title'] = self.title
290+
if self.subtitle:
291+
d['subtitle'] = self.subtitle
284292
if self.action_loc_key:
285293
d['action-loc-key'] = self.action_loc_key
286294
if self.loc_key:

0 commit comments

Comments
 (0)