]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/manager/Manager.java
Use legacy sender certificate, until uuid support is complete
[signal-cli] / src / main / java / org / asamk / signal / manager / Manager.java
index 3cf345c87156e9ed304a0612e5ad92c01088f173..b418d310e1a3e8acb1e6c2d6a2f828a22eeb8b2c 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();
@@ -995,7 +997,9 @@ public class Manager implements Signal {
     }
 
     private byte[] getSenderCertificate() throws IOException {
-        byte[] certificate = accountManager.getSenderCertificate();
+        // TODO support UUID capable sender certificates
+        // byte[] certificate = accountManager.getSenderCertificate();
+        byte[] certificate = accountManager.getSenderCertificateLegacy();
         // TODO cache for a day
         return certificate;
     }