Comparing version 2.0.0 to 2.0.1
@@ -7,2 +7,6 @@ # MPNS: Changelog | ||
2.0.1: | ||
* Contains a compatibility fix (thanks @yavorg) allowing for an older broken property case name, `smallbackgroundImage` to be translated to `smallBackgroundImage`. | ||
2.0.0: | ||
@@ -9,0 +13,0 @@ |
@@ -299,2 +299,9 @@ // Copyright Jeff Wilcox | ||
var payload = Array.prototype.shift.apply(args); | ||
// Adding back support for legacy 'smallbackgroundTile' property name, | ||
// the removal of which was breaking backwards compat | ||
if (payload.smallbackgroundImage) { | ||
payload.smallBackgroundImage = payload.smallbackgroundImage; | ||
} | ||
copyOfInterest(payload, params, typeProperties, type === 'tile'); | ||
@@ -301,0 +308,0 @@ copyOfInterest(payload, params, properties.ssl, false); |
{ | ||
"name": "mpns", | ||
"description": "A Node.js interface to the Microsoft Push Notification Service (MPNS) for Windows Phone.", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"author": "Jeff Wilcox <jeffwilcox+github@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -72,13 +72,2 @@ #mpns | ||
### Create a new notification object | ||
You can create a new notification object (either of type live tile or toast). This is the original style for this module but it is now recommended that you use the shorter `send*` syntax on the mpns object itself. This aligns with the WNS module for Windows in its simplicity. | ||
Property names for the notification object directly correlate to the names used in the MPNS XML payload as documented on MSDN. Properties can either be set directly on the object (such as toast.text1) or by passing the values in as options to the constructor. | ||
```javascript | ||
options = { text1: 'Hello!', text2: 'Great to see you today.' }; | ||
var toast = new mpns.toast(options); | ||
``` | ||
### Sending a raw notification | ||
@@ -85,0 +74,0 @@ When creating the notification object, either provide the raw payload first, or as the `options.payload` property. |
@@ -148,2 +148,10 @@ // Copyright Jeff Wilcox | ||
test('CreateFlipTileWithObjectLegacySmallBackgroundImage', function () { | ||
var tile = mpns.createFlipTile({ | ||
smallbackgroundImage : 'smallBackgroundImage' | ||
}); | ||
assert.deepEqual(tile.smallBackgroundImage, 'smallBackgroundImage'); | ||
}); | ||
test('CreateTileWithPrimitives', function () { | ||
@@ -150,0 +158,0 @@ var tile = mpns.createTile('', 1, 'hello', '', 'backtitle', 'backcontent'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35213
590
184