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

feat(push) add support for version 2.1.0 #2064

Merged
merged 1 commit into from
Dec 2, 2017

Conversation

dmnkgrc
Copy link
Contributor

@dmnkgrc dmnkgrc commented Oct 26, 2017

This commit adds support for the following methods:

  • createChannel
  • deleteChannel
  • listChannels

Also, I modified the PushEvent definition to allow any string, this because version 2.1.0 also allows to listen to action button callbacks: Action buttons documentation

Finally, I modified the finish() method, so that it can receive the notification id push.finish documentation

@ihadeed ihadeed merged commit c1ce5da into danielsogl:master Dec 2, 2017
@gregavola
Copy link

@dmnkgrc I'm seeing finish failure: success callback parameter must be a function, when you apply:

push.finish(data.additionalData.notId). then().catch((err) => console.log(err));

What's the correct docs on how to use this?

@dmnkgrc
Copy link
Contributor Author

dmnkgrc commented Dec 11, 2017

@gregavola I think you must pass a function ti the success callback:
push.finish(data.additionalData.notId). then(() => {}).catch((err) => console.log(err));

@gregavola
Copy link

@dmnkgrc has this been tested at all?

@dmnkgrc
Copy link
Contributor Author

dmnkgrc commented Dec 11, 2017

@gregavola Yes, I use this code on my own app

@gregavola
Copy link

@dmnkgrc Not sure then - because i tried this:

push.finish(data.additionalData.notId).then(() => {}).catch((err) =>> console.log(err));

and the error:

2017-12-11 08:17:03.046674-0500 XXXX[12131:5047101] finish failure: success callback parameter must be a function

@ihadeed
Copy link
Collaborator

ihadeed commented Dec 11, 2017

This PR has a mistake. The finish method is missing the decorator option: callbackOrder: 'reverse'. Just pushed a commit to fix it.

Please update @ionic-native/push to version 4.5.2. (Publishing now, will be live in ~3 minutes)

@dmnkgrc dmnkgrc deleted the push-version-2.1.0 branch January 15, 2018 22:08
@dmnkgrc dmnkgrc restored the push-version-2.1.0 branch January 15, 2018 22:08
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.

4 participants