mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
parent
15da210de7
commit
7816325e63
1 changed files with 8 additions and 4 deletions
|
@ -1378,7 +1378,7 @@ public class SignalAccount implements Closeable {
|
||||||
|
|
||||||
public void setPniIdentityKeyPair(final IdentityKeyPair identityKeyPair) {
|
public void setPniIdentityKeyPair(final IdentityKeyPair identityKeyPair) {
|
||||||
pniIdentityKeyPair = identityKeyPair;
|
pniIdentityKeyPair = identityKeyPair;
|
||||||
final var pniPublicKey = getPniIdentityKeyPair().getPublicKey();
|
final var pniPublicKey = identityKeyPair.getPublicKey();
|
||||||
getIdentityKeyStore().saveIdentity(getPni(), pniPublicKey);
|
getIdentityKeyStore().saveIdentity(getPni(), pniPublicKey);
|
||||||
getIdentityKeyStore().setIdentityTrustLevel(getPni(), pniPublicKey, TrustLevel.TRUSTED_VERIFIED);
|
getIdentityKeyStore().setIdentityTrustLevel(getPni(), pniPublicKey, TrustLevel.TRUSTED_VERIFIED);
|
||||||
save();
|
save();
|
||||||
|
@ -1594,9 +1594,13 @@ public class SignalAccount implements Closeable {
|
||||||
final var aciPublicKey = getAciIdentityKeyPair().getPublicKey();
|
final var aciPublicKey = getAciIdentityKeyPair().getPublicKey();
|
||||||
getIdentityKeyStore().saveIdentity(getAci(), aciPublicKey);
|
getIdentityKeyStore().saveIdentity(getAci(), aciPublicKey);
|
||||||
getIdentityKeyStore().setIdentityTrustLevel(getAci(), aciPublicKey, TrustLevel.TRUSTED_VERIFIED);
|
getIdentityKeyStore().setIdentityTrustLevel(getAci(), aciPublicKey, TrustLevel.TRUSTED_VERIFIED);
|
||||||
final var pniPublicKey = getPniIdentityKeyPair().getPublicKey();
|
if (getPniIdentityKeyPair() == null) {
|
||||||
getIdentityKeyStore().saveIdentity(getPni(), pniPublicKey);
|
setPniIdentityKeyPair(KeyUtils.generateIdentityKeyPair());
|
||||||
getIdentityKeyStore().setIdentityTrustLevel(getPni(), pniPublicKey, TrustLevel.TRUSTED_VERIFIED);
|
} else {
|
||||||
|
final var pniPublicKey = getPniIdentityKeyPair().getPublicKey();
|
||||||
|
getIdentityKeyStore().saveIdentity(getPni(), pniPublicKey);
|
||||||
|
getIdentityKeyStore().setIdentityTrustLevel(getPni(), pniPublicKey, TrustLevel.TRUSTED_VERIFIED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteAccountData() throws IOException {
|
public void deleteAccountData() throws IOException {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue