As of DiscipleTools/disciple-tools-mobile-app#179, we are sending another field: add_device_id when submitting the Push Notification Token to the D.T API:
https://${domain}/wp-json/dt/v1/user/update
{
"add_push_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
"add_device_id": "Apple:iPhone XR:2018:iOS:13.3.1"
}
So we will want to decide how to best handle this on the D.T API side. We could use the Device ID as a key to a hashmap and store only the latest token for a given device:
$myhashmap = array();
$myhashmap[$fields["add_device_id"]] = $fields["add_push_token"];
As of DiscipleTools/disciple-tools-mobile-app#179, we are sending another field:
add_device_idwhen submitting the Push Notification Token to the D.T API:https://${domain}/wp-json/dt/v1/user/updateSo we will want to decide how to best handle this on the D.T API side. We could use the Device ID as a
keyto a hashmap and store only the latest token for a given device: