Update libsignal-service-java

This commit is contained in:
AsamK 2022-03-16 21:04:14 +01:00
parent 3c2fa65e05
commit 942999b7b4
15 changed files with 60 additions and 52 deletions

View file

@ -24,7 +24,11 @@ public record JsonSendMessageResult(
? Type.SUCCESS
: result.isNetworkFailure()
? Type.NETWORK_FAILURE
: result.isUnregisteredFailure() ? Type.UNREGISTERED_FAILURE : Type.IDENTITY_FAILURE,
: result.isRateLimitFailure()
? Type.RATE_LIMIT_FAILURE
: result.isUnregisteredFailure()
? Type.UNREGISTERED_FAILURE
: Type.IDENTITY_FAILURE,
result.proofRequiredFailure() != null ? result.proofRequiredFailure().getToken() : null,
result.proofRequiredFailure() != null ? result.proofRequiredFailure().getRetryAfterSeconds() : null);
}
@ -34,5 +38,6 @@ public record JsonSendMessageResult(
NETWORK_FAILURE,
UNREGISTERED_FAILURE,
IDENTITY_FAILURE,
RATE_LIMIT_FAILURE,
}
}

View file

@ -100,6 +100,8 @@ public class SendMessageResultUtils {
failure.getRetryAfterSeconds());
} else if (result.isNetworkFailure()) {
return String.format("Network failure for \"%s\"", identifier);
} else if (result.isRateLimitFailure()) {
return String.format("Rate limit failure for \"%s\"", identifier);
} else if (result.isUnregisteredFailure()) {
return String.format("Unregistered user \"%s\"", identifier);
} else if (result.isIdentityFailure()) {