mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-26 10:34:23 +01:00
Update dependencies
This commit is contained in:
@@ -19,7 +19,6 @@ package org.asamk.signal;
|
||||
import net.sourceforge.argparse4j.ArgumentParsers;
|
||||
import net.sourceforge.argparse4j.impl.Arguments;
|
||||
import net.sourceforge.argparse4j.inf.*;
|
||||
import org.apache.http.util.TextUtils;
|
||||
import org.asamk.Signal;
|
||||
import org.asamk.signal.commands.*;
|
||||
import org.asamk.signal.manager.BaseConfig;
|
||||
@@ -35,6 +34,8 @@ import java.io.File;
|
||||
import java.security.Security;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.whispersystems.signalservice.internal.util.Util.isEmpty;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
@@ -82,7 +83,7 @@ public class Main {
|
||||
}
|
||||
} else {
|
||||
String dataPath = ns.getString("config");
|
||||
if (TextUtils.isEmpty(dataPath)) {
|
||||
if (isEmpty(dataPath)) {
|
||||
dataPath = getDefaultDataPath();
|
||||
}
|
||||
|
||||
|
||||
@@ -189,9 +189,9 @@ public class Manager implements Signal {
|
||||
accountManager = new SignalServiceAccountManager(BaseConfig.serviceConfiguration, account.getUsername(), account.getPassword(), BaseConfig.USER_AGENT, timer);
|
||||
|
||||
if (voiceVerification) {
|
||||
accountManager.requestVoiceVerificationCode(Locale.getDefault());
|
||||
accountManager.requestVoiceVerificationCode(Locale.getDefault(), Optional.<String>absent());
|
||||
} else {
|
||||
accountManager.requestSmsVerificationCode(false);
|
||||
accountManager.requestSmsVerificationCode(false, Optional.<String>absent());
|
||||
}
|
||||
|
||||
account.setRegistered(false);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.asamk.signal.manager;
|
||||
|
||||
import org.apache.http.util.TextUtils;
|
||||
import org.asamk.signal.AttachmentInvalidException;
|
||||
import org.signal.libsignal.metadata.certificate.CertificateValidator;
|
||||
import org.whispersystems.libsignal.IdentityKey;
|
||||
@@ -25,6 +24,8 @@ import java.net.URLEncoder;
|
||||
import java.nio.file.Files;
|
||||
import java.util.*;
|
||||
|
||||
import static org.whispersystems.signalservice.internal.util.Util.isEmpty;
|
||||
|
||||
class Utils {
|
||||
|
||||
static List<SignalServiceAttachment> getSignalServiceAttachments(List<String> attachments) throws AttachmentInvalidException {
|
||||
@@ -100,7 +101,7 @@ class Utils {
|
||||
String deviceIdentifier = query.get("uuid");
|
||||
String publicKeyEncoded = query.get("pub_key");
|
||||
|
||||
if (TextUtils.isEmpty(deviceIdentifier) || TextUtils.isEmpty(publicKeyEncoded)) {
|
||||
if (isEmpty(deviceIdentifier) || isEmpty(publicKeyEncoded)) {
|
||||
throw new RuntimeException("Invalid device link uri");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user