Add support for invalid pre key failure when sending message

This commit is contained in:
AsamK 2023-06-11 17:47:48 +02:00
parent da25b2a763
commit 0c5993c0ad
2 changed files with 9 additions and 23 deletions

View file

@ -28,7 +28,9 @@ public record JsonSendMessageResult(
? Type.NETWORK_FAILURE
: result.isUnregisteredFailure()
? Type.UNREGISTERED_FAILURE
: Type.IDENTITY_FAILURE,
: result.isInvalidPreKeyFailure()
? Type.INVALID_PRE_KEY_FAILURE
: Type.IDENTITY_FAILURE,
result.proofRequiredFailure() != null ? result.proofRequiredFailure().getToken() : null,
result.proofRequiredFailure() != null ? result.proofRequiredFailure().getRetryAfterSeconds() : null);
}
@ -39,5 +41,6 @@ public record JsonSendMessageResult(
UNREGISTERED_FAILURE,
IDENTITY_FAILURE,
RATE_LIMIT_FAILURE,
INVALID_PRE_KEY_FAILURE,
}
}