44from packet .models import NotificationSubscription
55
66post_body = {
7- "content " : {"en" : "Default message" },
7+ "contents " : {"en" : "Default message" },
88 "headings" : {"en" : "Default Title" },
9- "included_segments" : ["Active Users" , "Inactive Users" ],
109 "chrome_web_icon" : app .config ["PROTOCOL" ] + app .config ["SERVER_NAME" ] + "/static/android-chrome-512x512.png" ,
1110 "chrome_web_badge" : app .config ["PROTOCOL" ] + app .config ["SERVER_NAME" ] + "/static/android-chrome-512x512.png" ,
1211 "url" : app .config ["PROTOCOL" ] + app .config ["SERVER_NAME" ]
@@ -19,7 +18,7 @@ def packet_signed_notification(packet, signer):
1918 tokens = list (map (lambda subscription : subscription .token , subscriptions ))
2019
2120 notification = onesignal .Notification (post_body = post_body )
22- notification .post_body ["content " ]["en" ] = signer + ' signed your packet! Congrats or I\' m Sorry'
21+ notification .post_body ["contents " ]["en" ] = signer + ' signed your packet! Congrats or I\' m Sorry'
2322 notification .post_body ["headings" ]["en" ] = 'New Packet Signature!'
2423 notification .post_body ["chrome_web_icon" ] = 'https://profiles.csh.rit.edu/image/' + signer
2524 notification .post_body ["include_player_ids" ] = tokens
@@ -35,7 +34,7 @@ def packet_100_percent_notification(packet):
3534 tokens = list (map (lambda subscription : subscription .token , subscriptions ))
3635
3736 notification = onesignal .Notification (post_body = post_body )
38- notification .post_body ["content " ]["en" ] = packet .freshman .name + ' got 💯 on packet!'
37+ notification .post_body ["contents " ]["en" ] = packet .freshman .name + ' got 💯 on packet!'
3938 notification .post_body ["headings" ]["en" ] = 'New 100% on Packet!'
4039 # TODO: Issue #156
4140 notification .post_body ["chrome_web_icon" ] = 'https://profiles.csh.rit.edu/image/' + packet .freshman_username
0 commit comments