Commit 6771fd80 authored by Finn Herzfeld's avatar Finn Herzfeld 🌵

Remove identityKeyStore migration just in case

parent 16fdda7e
Pipeline #4069 failed with stages
in 6 minutes and 6 seconds
......@@ -113,9 +113,6 @@ public class AccountData {
if(address == null) {
address = new JsonAddress(username);
}
if(axolotlStore.identityKeyStore.dedup()) {
save();
}
}
public void save() throws IOException {
......
......@@ -169,32 +169,6 @@ public class IdentityKeyStore implements org.whispersystems.libsignal.state.Iden
return maxIdentity.getKey();
}
public boolean dedup() {
List<Identity> duplicates = new ArrayList<>();
// this is a hell of a lot of nested loops...
for(Identity i : trustedKeys) {
for(Identity j : trustedKeys) {
if(i.identityKey.equals(j.identityKey)) {
for(Identity dup : duplicates) {
if(dup.address.matches(i.address)) {
i.address.update(dup.address.getSignalServiceAddress());
continue;
}
}
duplicates.add(i);
}
}
}
for(Identity dup : duplicates) {
logger.warn("Found duplicate identity key with address " + dup.address.toRedactedString());
trustedKeys.remove(dup);
}
return duplicates.size() > 0;
}
@JsonIgnore
public List<Identity> getIdentities() {
return trustedKeys;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment