mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 07:38:03 +01:00
Update to Pushy 0.15.0
This commit is contained in:
committed by
Jon Chambers
parent
f2c6ca182d
commit
a9339b7037
@@ -88,12 +88,15 @@ public class RetryingApnsClient {
|
||||
if (response != null) {
|
||||
if (response.isAccepted()) {
|
||||
future.set(new ApnResult(ApnResult.Status.SUCCESS, null));
|
||||
} else if ("Unregistered".equals(response.getRejectionReason()) ||
|
||||
"BadDeviceToken".equals(response.getRejectionReason())) {
|
||||
future.set(new ApnResult(ApnResult.Status.NO_SUCH_USER, response.getRejectionReason()));
|
||||
} else {
|
||||
logger.warn("Got APN failure: " + response.getRejectionReason());
|
||||
future.set(new ApnResult(ApnResult.Status.GENERIC_FAILURE, response.getRejectionReason()));
|
||||
final String rejectionReason = response.getRejectionReason().orElse(null);
|
||||
|
||||
if ("Unregistered".equals(rejectionReason) || "BadDeviceToken".equals(rejectionReason)) {
|
||||
future.set(new ApnResult(ApnResult.Status.NO_SUCH_USER, rejectionReason));
|
||||
} else {
|
||||
logger.warn("Got APN failure: {}", rejectionReason);
|
||||
future.set(new ApnResult(ApnResult.Status.GENERIC_FAILURE, rejectionReason));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.warn("Execution exception", cause);
|
||||
|
||||
Reference in New Issue
Block a user