remove device token when APNS error is BadDeviceToken (#4220)

This commit is contained in:
bivisss
2017-09-29 17:05:45 -03:00
committed by Florent Vilmart
parent c777a263ba
commit 7c07fff7cc

View File

@@ -226,7 +226,7 @@ export function pushStatusHandler(config, existingObjectId) {
devicesToRemove.push(token);
}
// APNS errors
if (error === 'Unregistered') {
if (error === 'Unregistered' || error === 'BadDeviceToken') {
devicesToRemove.push(token);
}
}