-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Adds X-Parse-Push-Status-Id header #1412
Conversation
@@ -38,7 +38,7 @@ export class PushController extends AdaptableController { | |||
return !!this.adapter; | |||
} | |||
|
|||
sendPush(body = {}, where = {}, config, auth, wait) { | |||
sendPush(body = {}, where = {}, config, auth, pushStatusIdCallback = () => {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that's not super nice, but I didn't want to break the returned promise that allow us to test the push flow.
Open to suggestions
Current coverage is
|
This seems reasonable given the constraints, but shouldn't the POST handles be waiting to respond until after the |
That can be long, and defeats the purpose of the push status... Open to change it though but that will impact negatively the performance, I don't believe parse.com was waiting for it to be done. |
Hmmm I'm not super familiar with the model we are using here, it must be different from Parse.com. In Parse.com we write a push status object, then read from it to actually send the push. We respond to the request once the push status object is written, not when the push has finished. Is that not how it works here? |
we don't wait for anything in that case. I could wait for the initial _PushStatus to be stored before calling back. |
I think this makes more sense. It's too bad we rely on the result of the long-running promise, or we could return the earlier promise. Can you call your callback function |
waiting for travis then merging |
@flovilmart updated the pull request. |
fixes #1157