mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Catch ProofRequiredException from getPreKeys request and wrap in SendMessageResult
This commit is contained in:
parent
0e6644a890
commit
a17262d9ff
2 changed files with 4 additions and 1 deletions
|
@ -22,6 +22,7 @@ import org.whispersystems.signalservice.api.messages.SignalServiceReceiptMessage
|
|||
import org.whispersystems.signalservice.api.messages.SignalServiceTypingMessage;
|
||||
import org.whispersystems.signalservice.api.messages.multidevice.SentTranscriptMessage;
|
||||
import org.whispersystems.signalservice.api.messages.multidevice.SignalServiceSyncMessage;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.ProofRequiredException;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.UnregisteredUserException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -282,6 +283,8 @@ public class SendHelper {
|
|||
message,
|
||||
SignalServiceMessageSender.IndividualSendEvents.EMPTY);
|
||||
}
|
||||
} catch (ProofRequiredException e) {
|
||||
return SendMessageResult.proofRequiredFailure(address, e);
|
||||
} catch (org.whispersystems.signalservice.api.crypto.UntrustedIdentityException e) {
|
||||
return SendMessageResult.identityFailure(address, e.getIdentityKey());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue