Closed mtrezza closed 6 years ago
Merging #117 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #117 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 5 5
Lines 256 258 +2
=====================================
+ Hits 256 258 +2
Impacted Files | Coverage Δ | |
---|---|---|
src/APNS.js | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 425d7d8...fec1644. Read the comment docs.
Can you please add a test to ensure the notification get the proper setter called when the added key value pairs are passed part of the payload?
Awesome! Thanks!
@mtrezza @flovilmart I'm trying to implement thread-id via Cloud Code, but haven't been able to get it to work. I've tried putting threadId in the alert and the data dictionary, and have also tried threadId
and thread-id
for the variable name. Any thoughts on what I could be doing wrong here?
Parse.Push.send({
where: pushQuery, // Set our Installation query
collapse_id: request.params.collapseId,
threadId: request.params.threadId,
data: {
alert: {
title: request.params.title,
body: request.params.body,
threadId: request.params.threadId,
},
sound: request.params.sound,
category: request.params.category,
threadId: request.params.threadId,
userInfo: request.params.userInfo,
}
}
@bmueller
Parse.Push.send({
where: pushQuery, // Set our Installation query
collapse_id: request.params.collapseId,
data: {
alert: {
title: request.params.title,
body: request.params.body
},
sound: request.params.sound,
category: request.params.category,
threadId: request.params.threadId,
userInfo: request.params.userInfo
}
}
This should work. If it doesn't, I suggest you start by checking the APN data received on the device.
@mtrezza
Hmm, when I put the thread ID in the data dictionary, the payload
sent by Parse has threadId
in it (see below), but when I put a breakpoint on the UNNotification in willPresentNotification
in the app, threadIdentifier
is set to @""
. Everything else sent in the payload (category, title, etc) is set correctly on the UNNotification.
"payload":"{\"alert\":{\"title\":\"Test\",\"body\":\"Testing 1 2 3.\"},\"sound\":\"default\",\"category\":\"custom\",\"threadId\":\"Testing This\",\"userInfo\":{\"dataPoint\":4}}"
@mtrezza
Here's the userInfo dictionary on the notification as it comes in. Shouldn't the threadId appear inside the aps
dictionary?
aps = {
alert = {
body = "Testing 1 2 3.";
title = Test;
};
category = custom;
sound = default;
};
threadId = "test test";
Thanks for the PR