Skip to content

Commit 7f9f4b8

Browse files
authored
Merge pull request #25 from capkovic/master
GCM ttl fix
2 parents 6c5dd61 + b6da769 commit 7f9f4b8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pywebpush/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ def send(self, data, headers=None, ttl=0, gcm_key=None, reg_id=None):
198198
data['registration_ids'] = reg_ids
199199
data['raw_data'] = base64.b64encode(
200200
encoded.get('body')).decode('utf8')
201+
data['time_to_live'] = long(headers['ttl'] if 'ttl' in headers else ttl)
201202
encoded_data = json.dumps(data)
202203
headers.update({
203204
'Authorization': 'key='+gcm_key,

0 commit comments

Comments
 (0)