}
dependencies {
- compile 'com.github.turasa:signal-service-java:2.12.7_unofficial_1'
- compile 'org.bouncycastle:bcprov-jdk15on:1.60'
+ compile 'com.github.turasa:signal-service-java:2.13.0_unofficial_2'
+ compile 'org.bouncycastle:bcprov-jdk15on:1.61'
compile 'net.sourceforge.argparse4j:argparse4j:0.8.1'
compile 'org.freedesktop.dbus:dbus-java:2.7.0'
}
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;
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) {
}
} else {
String dataPath = ns.getString("config");
- if (TextUtils.isEmpty(dataPath)) {
+ if (isEmpty(dataPath)) {
dataPath = getDefaultDataPath();
}
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);
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;
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 {
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");
}