b8ne / react-native-pusher-push-notifications

Manage pusher interest subscriptions and notification events in Javascript.
MIT License
97 stars 85 forks source link

Error callback is not fired on unsuccessful unsubscribe #29

Closed ewal closed 5 years ago

ewal commented 5 years ago

Hi, I implemented the unsubscribe method according to the example and sent in an incorrect interest name but the callbacks never fired. I did so by mistake I should add and was stuck with this for a while 😄

  RNPusherPushNotifications.unsubscribe('faulty-interest-name', (statusCode, response) => {
    console.tron.log(statusCode, response); // Nothing here
  }, () => {
    console.tron.log('Success'); // ... or here
  });

I'm using Reactotron for logging.

b8ne commented 5 years ago

Hi @ewal unfortunately only RN Android supports callbacks(that are stable) at the moment. This will be implemented when we add support for Android. I will also look to update our README to make this clearer.