Fixed feedbackData.device being a Device instead of a Buffer

This commit is contained in:
zenorbi
2015-08-19 09:48:06 +02:00
parent 20305aba6d
commit 6ddf6c5ede
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ var feedbackService = new apn.Feedback({
feedbackService.on("error", (error:Error) => {
console.log("push feedback error", error.name, error.message);
});
function processFeedbackData(device:Buffer, time:number) {
function processFeedbackData(device:apn.Device, time:number) {
}
feedbackService.on("feedback", (feedbackData) => {
feedbackData.forEach((data) => {
@@ -135,7 +135,7 @@ pushSomeNotifications();
function handleFeedback(feedbackData:apn.FeedbackData[]) {
feedbackData.forEach(function(feedbackItem) {
console.log("Device: " + feedbackItem.device.toString("hex") + " has been unreachable, since: " + feedbackItem.time);
console.log("Device: " + feedbackItem.device.toString() + " has been unreachable, since: " + feedbackItem.time);
});
}
+1 -1
View File
@@ -307,7 +307,7 @@ declare module "apn" {
}
export interface FeedbackData {
time:number;
device:Buffer;
device:Device;
}
/**
* Connection to the Apple Push Notification Feedback Service and if `interval` isn't disabled automatically begins polling the service. Many of the options are the same as `apn.Connection()`