Implement listIdentities and trust commands

Print the fingerprints of all known phone numbers and can set their trust
This commit is contained in:
AsamK
2016-07-14 15:35:59 +02:00
parent bfb51e414b
commit f095d947f8
5 changed files with 156 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ import org.whispersystems.libsignal.state.SignalProtocolStore;
import org.whispersystems.libsignal.state.SignedPreKeyRecord;
import java.util.List;
import java.util.Map;
class JsonSignalProtocolStore implements SignalProtocolStore {
@@ -72,6 +73,14 @@ class JsonSignalProtocolStore implements SignalProtocolStore {
identityKeyStore.saveIdentity(name, identityKey, trustLevel, null);
}
public Map<String, List<JsonIdentityKeyStore.Identity>> getIdentities() {
return identityKeyStore.getIdentities();
}
public List<JsonIdentityKeyStore.Identity> getIdentities(String name) {
return identityKeyStore.getIdentities(name);
}
@Override
public boolean isTrustedIdentity(String name, IdentityKey identityKey) {
return identityKeyStore.isTrustedIdentity(name, identityKey);