Closed ghost closed 8 years ago
I think this should work if you bind the sender object to the send method in the second line:
var sendergcm = Promise.promisify(sender.send.bind(sender));
sender.send
refers to the send
function without the context of the sender --- you need to explicitly bind this context.
Ok thanks.
I tried using Promise.promisify method of bluebird library, to get the return result as a promise. But I was getting an error while doing this
-[TypeError: this.sendNoRetry is not a function]
, This is the code for it -