Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#160025746 Fix push messages not sending error #42

Merged
merged 1 commit into from
Aug 24, 2018

Conversation

olusoladavid
Copy link
Owner

@olusoladavid olusoladavid commented Aug 24, 2018

What does this PR do?

Fixes error in push message sending procedure.

Description of Task to be completed

Push messages are not sent due to a JSON parsing error in the sendReminder.js file. The solution implemented is to:

  • Parse push subscription JSON from the database and pass the parsed JSON into webpush.sendNotification() function as the first argument
  • Test that the local development server pushes
  • Ensures tests pass

How should this be manually tested?

  • Pull branch into local machine
  • Start development server with npm run dev
  • Send a valid push subscription using the format below to PUT /profile
{
"push_sub": {<validPushSubscription>},
"reminder_set": true
}
  • Run babel-node server/workers/sendReminder.js to force a push message send

What are the relevant pivotal tracker stories?

#160025746

- push messages are not sent due to a JSON parsing error in the sendReminder.js file
- the solution implemented is to parse push subscription JSON from the database before feeding into webpush

[Delivers #160025746]
@olusoladavid olusoladavid merged commit f4b126d into develop Aug 24, 2018
@coveralls
Copy link

Pull Request Test Coverage Report for Build 141

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 139: 0.0%
Covered Lines: 182
Relevant Lines: 182

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants