Skip to content

Commit 241a2f6

Browse files
Merge pull request #24 from JoaoCaixinha/master
Fixes unsubscribe callback not being call
2 parents e56a1a6 + d348044 commit 241a2f6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordovapush",
3-
"version": "0.1.26",
3+
"version": "0.1.27",
44
"description": "This Cordova plugin should be used with the iOS/Android platforms together with the Realtime Messaging library (ORTC) for Push Notifications support.",
55
"main": "index.js",
66
"scripts": {

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
33
id="co.realtime.plugins.CordovaPush"
4-
version="0.1.26">
4+
version="0.1.27">
55

66
<name>cordovapush</name>
77
<author>Reatime</author>

src/android/OrtcPushPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public void run() {
210210
return true;
211211
}
212212
else if(ACTION_UNSUBSCRIBE.equals(action)){
213-
commands.put(ACTION_SUBSCRIBE, callbackContext);
213+
commands.put(ACTION_UNSUBSCRIBE, callbackContext);
214214
cordova.getThreadPool().execute(new Runnable() {
215215
@Override
216216
public void run() {
@@ -227,7 +227,7 @@ public void run() {
227227
return true;
228228
}
229229
else if(ACTION_CANCEL_NOTIFICATIONS.equals(action)){
230-
commands.put(ACTION_SUBSCRIBE, callbackContext);
230+
commands.put(ACTION_CANCEL_NOTIFICATIONS, callbackContext);
231231
final NotificationManager notificationManager = (NotificationManager) this.cordova.getActivity().getSystemService(this.cordova.getActivity().NOTIFICATION_SERVICE);
232232
notificationManager.cancelAll();
233233
callbackContext.success();

0 commit comments

Comments
 (0)