mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Reformat code
This commit is contained in:
parent
a96c4938b1
commit
4f8da7819e
4 changed files with 27 additions and 28 deletions
|
@ -38,15 +38,15 @@ public class TrustCommand implements JsonRpcLocalCommand {
|
|||
var recipentString = ns.getString("recipient");
|
||||
var recipient = CommandUtil.getSingleRecipientIdentifier(recipentString, m.getSelfNumber());
|
||||
if (Boolean.TRUE.equals(ns.getBoolean("trust-all-known-keys"))) {
|
||||
boolean res;
|
||||
try {
|
||||
res = m.trustIdentityAllKeys(recipient);
|
||||
final var res = m.trustIdentityAllKeys(recipient);
|
||||
if (!res) {
|
||||
throw new UserErrorException(
|
||||
"Failed to set the trust for this number, make sure the number is correct.");
|
||||
}
|
||||
} catch (UnregisteredRecipientException e) {
|
||||
throw new UserErrorException("The user " + e.getSender().getIdentifier() + " is not registered.");
|
||||
}
|
||||
if (!res) {
|
||||
throw new UserErrorException("Failed to set the trust for this number, make sure the number is correct.");
|
||||
}
|
||||
} else {
|
||||
var safetyNumber = ns.getString("verified-safety-number");
|
||||
if (safetyNumber == null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue