]> nmode's Git Repositories - signal-cli/commitdiff
Mark our own identity key as trusted initially
authorAsamK <asamk@gmx.de>
Tue, 24 Mar 2020 17:16:05 +0000 (18:16 +0100)
committerAsamK <asamk@gmx.de>
Tue, 24 Mar 2020 17:16:05 +0000 (18:16 +0100)
to match Signal-Android behavior

src/main/java/org/asamk/signal/manager/Manager.java

index 3cf345c87156e9ed304a0612e5ad92c01088f173..94d0e929a9a8dff997b85c5bf06419c4293cee81 100644 (file)
@@ -258,6 +258,8 @@ public class Manager implements Signal {
         if (username == null) {
             account = SignalAccount.createTemporaryAccount(identityKey, registrationId);
         } else {
+            account.getSignalProtocolStore().saveIdentity(username, identityKey.getPublicKey(), TrustLevel.TRUSTED_VERIFIED);
+
             ProfileKey profileKey = KeyUtils.createProfileKey();
             account = SignalAccount.create(dataPath, username, identityKey, registrationId, profileKey);
             account.save();