]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/App.java
Remove libsignal-service from manager lib API
[signal-cli] / src / main / java / org / asamk / signal / App.java
index c44c737c3385648dae21eb8d2c1a260670fcdc00..7c86f09ed8f389e45921435854bb55d7e2492bb8 100644 (file)
@@ -32,7 +32,6 @@ import org.freedesktop.dbus.exceptions.DBusException;
 import org.freedesktop.dbus.exceptions.DBusExecutionException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.whispersystems.signalservice.api.util.PhoneNumberFormatter;
 
 import java.io.File;
 import java.io.IOException;
@@ -133,7 +132,7 @@ public class App {
             dataPath = getDefaultDataPath();
         }
 
-        if (!ServiceConfig.getCapabilities().isGv2()) {
+        if (!ServiceConfig.isZkgroupAvailable()) {
             logger.warn("WARNING: Support for new group V2 is disabled,"
                     + " because the required native library dependency is missing: libzkgroup");
         }
@@ -182,7 +181,7 @@ public class App {
             }
 
             username = usernames.get(0);
-        } else if (!PhoneNumberFormatter.isValidNumber(username, null)) {
+        } else if (!Manager.isValidNumber(username, null)) {
             throw new UserErrorException("Invalid username (phone number), make sure you include the country code.");
         }
 
@@ -349,7 +348,7 @@ public class App {
             ((ExtendedDbusCommand) command).handleCommand(ns, ts, dBusConn, outputWriter);
         } else if (command instanceof LocalCommand) {
             try {
-                ((LocalCommand) command).handleCommand(ns, new DbusManagerImpl(ts), outputWriter);
+                ((LocalCommand) command).handleCommand(ns, new DbusManagerImpl(ts, dBusConn), outputWriter);
             } catch (UnsupportedOperationException e) {
                 throw new UserErrorException("Command is not yet implemented via dbus", e);
             } catch (DBusExecutionException e) {