alexwhitman / node-pushbullet-api

PushBullet API module for Node.js
165 stars 36 forks source link

Strange behavior with chrome extension. #25

Closed gabraganca closed 7 years ago

gabraganca commented 7 years ago

Hi. Thanks for setting up such a nice package.

I have PushBullet on two Android devices and also the Chrome extension. When using node-pushbullet-api to push notifications, strange things happens sometimes.

If I use:

var PushBullet = require('pushbullet');
var pusher = new PushBullet('token');

pusher.devices((err, res) => {
  res.devices.forEach(device => {
    pusher.note(device.iden, 'Test', 'This is a test', function(error, response) {
    })
  })
})

It notifies the android devices, but in Chrome it opens the PushBullet webpage.

But if I use an example given in issue #15 :

var PushBullet = require('pushbullet');
var pusher = new PushBullet('token');

var deviceParams = {};
pusher.note(deviceParams, 'Test', 'This is a test', function(error, response) {
 });

The strange behavior in Chrome does no happen and I got the Chome notification bubble.

Could you help me out?

alexwhitman commented 7 years ago

The same thing happens with the Firefox extension. It'll be down to the extension code rather than anything this package is doing. I'd suggest contacting the PushBullet guys.

gabraganca commented 7 years ago

Thanks, @alexwhitman .