mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
Move storage package to manager
This commit is contained in:
parent
9e6a353427
commit
b738f5740c
34 changed files with 148 additions and 141 deletions
|
@ -4,7 +4,7 @@ import net.sourceforge.argparse4j.inf.Namespace;
|
|||
import net.sourceforge.argparse4j.inf.Subparser;
|
||||
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.storage.contacts.ContactInfo;
|
||||
import org.asamk.signal.manager.storage.contacts.ContactInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.sourceforge.argparse4j.inf.Subparser;
|
|||
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.manager.groups.GroupInviteLinkUrl;
|
||||
import org.asamk.signal.storage.groups.GroupInfo;
|
||||
import org.asamk.signal.manager.storage.groups.GroupInfo;
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.sourceforge.argparse4j.inf.Namespace;
|
|||
import net.sourceforge.argparse4j.inf.Subparser;
|
||||
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.storage.protocol.JsonIdentityKeyStore;
|
||||
import org.asamk.signal.manager.storage.protocol.IdentityInfo;
|
||||
import org.asamk.signal.util.Hex;
|
||||
import org.asamk.signal.util.Util;
|
||||
import org.whispersystems.signalservice.api.util.InvalidNumberException;
|
||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
|||
|
||||
public class ListIdentitiesCommand implements LocalCommand {
|
||||
|
||||
private static void printIdentityFingerprint(Manager m, JsonIdentityKeyStore.Identity theirId) {
|
||||
private static void printIdentityFingerprint(Manager m, IdentityInfo theirId) {
|
||||
String digits = Util.formatSafetyNumber(m.computeSafetyNumber(theirId.getAddress(), theirId.getIdentityKey()));
|
||||
System.out.println(String.format("%s: %s Added: %s Fingerprint: %s Safety Number: %s",
|
||||
theirId.getAddress().getNumber().orNull(),
|
||||
|
@ -35,14 +35,14 @@ public class ListIdentitiesCommand implements LocalCommand {
|
|||
return 1;
|
||||
}
|
||||
if (ns.get("number") == null) {
|
||||
for (JsonIdentityKeyStore.Identity identity : m.getIdentities()) {
|
||||
for (IdentityInfo identity : m.getIdentities()) {
|
||||
printIdentityFingerprint(m, identity);
|
||||
}
|
||||
} else {
|
||||
String number = ns.getString("number");
|
||||
try {
|
||||
List<JsonIdentityKeyStore.Identity> identities = m.getIdentities(number);
|
||||
for (JsonIdentityKeyStore.Identity id : identities) {
|
||||
List<IdentityInfo> identities = m.getIdentities(number);
|
||||
for (IdentityInfo id : identities) {
|
||||
printIdentityFingerprint(m, id);
|
||||
}
|
||||
} catch (InvalidNumberException e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue