diff --git a/notifications/utils.py b/notifications/utils.py index 0764db6..9e360df 100644 --- a/notifications/utils.py +++ b/notifications/utils.py @@ -90,9 +90,12 @@ def get_notification_data(notification_type, from_user_id, from_user_type, to_us notification_data['body'] = notification_data['body'].format(from_user=from_user_name, task_name=task_name, points=points) + push_data['to_user_type'] = GUARDIAN if from_user_type == JUNIOR else JUNIOR + notification_data['to_user_type'] = GUARDIAN if from_user_type == JUNIOR else JUNIOR + notification_data['from_user'] = from_user_name notification_data['from_user_image'] = from_user_image - notification_data['to_user_type'] = GUARDIAN if from_user_type == JUNIOR else JUNIOR + notification_data.update(extra_data) to_user = User.objects.filter(id=to_user_id).first()