Skip to content

Commit

Permalink
add support for mdm push notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea authored and argon committed Feb 28, 2013
1 parent 673c67b commit b3dad81
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/notification.js
Expand Up @@ -25,7 +25,7 @@ function Notification () {
*/
Notification.prototype.clone = function (device) {
var notification = new Notification();

notification.encoding = this.encoding;
notification.payload = this.payload;
notification.expiry = this.expiry;
Expand All @@ -36,7 +36,7 @@ Notification.prototype.clone = function (device) {
notification.badge = this.badge;
notification.sound = this.sound;
notification.newsstandAvailable = this.newsstandAvailable;

return notification
}

Expand Down Expand Up @@ -173,6 +173,10 @@ Notification.prototype.toJSON = function () {
if (this.payload === undefined) {
this.payload = {};
}
if (typeof this.mdm == 'string') {
this.payload.mdm = this.mdm;
return this.payload;
}
if (this.payload.aps === undefined) {
this.payload.aps = {};
}
Expand Down

0 comments on commit b3dad81

Please sign in to comment.