mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-21 16:08:27 +00:00
Fix for identity key mismatch on devices with V1 identities.
This commit is contained in:
parent
7bb45d8a91
commit
e8a0fac05b
@ -5,6 +5,7 @@ import android.util.Log;
|
|||||||
|
|
||||||
import org.whispersystems.textsecure.crypto.IdentityKey;
|
import org.whispersystems.textsecure.crypto.IdentityKey;
|
||||||
import org.whispersystems.textsecure.crypto.MasterSecret;
|
import org.whispersystems.textsecure.crypto.MasterSecret;
|
||||||
|
import org.whispersystems.textsecure.crypto.protocol.CiphertextMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class for generating key pairs and calculating ECDH agreements.
|
* Helper class for generating key pairs and calculating ECDH agreements.
|
||||||
@ -84,8 +85,7 @@ public class Session {
|
|||||||
recipient.getRecipientId(),
|
recipient.getRecipientId(),
|
||||||
RecipientDevice.DEFAULT_DEVICE_ID))
|
RecipientDevice.DEFAULT_DEVICE_ID))
|
||||||
{
|
{
|
||||||
return new SessionRecordV2(context, masterSecret, recipient.getRecipientId(),
|
return CiphertextMessage.CURRENT_VERSION;
|
||||||
RecipientDevice.DEFAULT_DEVICE_ID).getSessionVersion();
|
|
||||||
} else if (SessionRecordV1.hasSession(context, recipient)) {
|
} else if (SessionRecordV1.hasSession(context, recipient)) {
|
||||||
return new SessionRecordV1(context, masterSecret, recipient).getSessionVersion();
|
return new SessionRecordV1(context, masterSecret, recipient).getSessionVersion();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user