mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 08:32:34 +00:00
Resolve TODO
This commit is contained in:
@@ -47,7 +47,7 @@ public class TextSecureIdentityKeyStore implements IdentityKeyStore {
|
||||
public boolean saveIdentity(SignalProtocolAddress address, IdentityKey identityKey, boolean nonBlockingApproval) {
|
||||
synchronized (LOCK) {
|
||||
IdentityDatabase identityDatabase = DatabaseFactory.getIdentityDatabase(context);
|
||||
Address signalAddress = Address.fromExternal(context, address.getName());
|
||||
Address signalAddress = Address.fromSerialized(address.getName());
|
||||
Optional<IdentityRecord> identityRecord = identityDatabase.getIdentity(signalAddress);
|
||||
|
||||
if (!identityRecord.isPresent()) {
|
||||
@@ -94,7 +94,7 @@ public class TextSecureIdentityKeyStore implements IdentityKeyStore {
|
||||
synchronized (LOCK) {
|
||||
IdentityDatabase identityDatabase = DatabaseFactory.getIdentityDatabase(context);
|
||||
String ourNumber = TextSecurePreferences.getLocalNumber(context);
|
||||
Address theirAddress = Address.fromExternal(context, address.getName());
|
||||
Address theirAddress = Address.fromSerialized(address.getName());
|
||||
|
||||
if (ourNumber.equals(address.getName()) || Address.fromSerialized(ourNumber).equals(theirAddress)) {
|
||||
return identityKey.equals(IdentityKeyUtil.getIdentityKey(context));
|
||||
|
||||
Reference in New Issue
Block a user