Mark our own identity key as trusted initially

to match Signal-Android behavior
This commit is contained in:
AsamK 2020-03-24 18:16:05 +01:00
parent 995de3ef5b
commit 5df8f32820

View file

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