Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packet/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
def packet_signed_notification(packet, signer):
subscriptions = NotificationSubscription.query.filter_by(freshman_username=packet.freshman_username)
if subscriptions:
tokens = list(filter(lambda subscription: subscription.token, subscriptions))
tokens = list(map(lambda subscription: subscription.token, subscriptions))

notification = onesignal.Notification(post_body=post_body)
notification.post_body["content"]["en"] = signer + ' signed your packet! Congrats or I\'m Sorry'
Expand All @@ -32,7 +32,7 @@ def packet_signed_notification(packet, signer):
def packet_100_percent_notification(packet):
subscriptions = NotificationSubscription.query.all()
if subscriptions:
tokens = list(filter(lambda subscription: subscription.token, subscriptions))
tokens = list(map(lambda subscription: subscription.token, subscriptions))

notification = onesignal.Notification(post_body=post_body)
notification.post_body["content"]["en"] = packet.freshman.name + ' got 💯 on packet!'
Expand Down