Conversation
|
👍 FWIW |
7a19ee5 to
aea9c87
Compare
|
@flovilmart updated the pull request. |
aea9c87 to
ee3b37d
Compare
|
@flovilmart updated the pull request. |
| return badgeUpdate.then(() => { | ||
| return rest.find(config, auth, '_Installation', where) | ||
| }).then((response) => { | ||
| if (body.badge && body.badge == "Increment") { |
There was a problem hiding this comment.
This looks fine, what do you think if we would inplace mutate every installation instead before sending?
Which looks like you already sort of do with collection iteration aka results.reduce, but this would probably reduce complexity of reading this...
There was a problem hiding this comment.
Also, would actually remove the requirement to send multiple times, since the complexity of sending with a badge and without is the same.
|
Optimization suggestion, feel free to ignore though. |
Adds support for badging on iOS
| rest.find(config, auth, '_Installation', where).then(function(response) { | ||
| let badgeUpdate = Promise.resolve(); | ||
|
|
||
| if (body.badge) { |
There was a problem hiding this comment.
is there a way to reuse this code for Amazon SNS?
There was a problem hiding this comment.
You actually don't need to use this piece, since this happens before PushAdapter, which is the extension point where SNS would be plugged in.
Fix for #723