mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-28 22:50:44 +00:00
Update to latest version of libtextsecure for simplified interface.
1) Switch to new TextSecureAddress addressing, rather than mixing long-based recipient IDs into libtextsecure. 2) Get rid of RecipientFormattingException throws in calls to RecipientFactory. Closes #2570
This commit is contained in:
@@ -30,6 +30,7 @@ import org.thoughtcrime.securesms.recipients.RecipientFactory;
|
||||
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
import org.whispersystems.libaxolotl.AxolotlAddress;
|
||||
import org.whispersystems.libaxolotl.IdentityKey;
|
||||
import org.whispersystems.libaxolotl.state.SessionRecord;
|
||||
import org.whispersystems.libaxolotl.state.SessionStore;
|
||||
@@ -183,9 +184,9 @@ public class VerifyIdentityActivity extends KeyScanningActivity {
|
||||
}
|
||||
|
||||
private IdentityKey getRemoteIdentityKey(MasterSecret masterSecret, Recipient recipient) {
|
||||
SessionStore sessionStore = new TextSecureSessionStore(this, masterSecret);
|
||||
SessionRecord record = sessionStore.loadSession(recipient.getRecipientId(),
|
||||
TextSecureAddress.DEFAULT_DEVICE_ID);
|
||||
SessionStore sessionStore = new TextSecureSessionStore(this, masterSecret);
|
||||
AxolotlAddress axolotlAddress = new AxolotlAddress(recipient.getNumber(), TextSecureAddress.DEFAULT_DEVICE_ID);
|
||||
SessionRecord record = sessionStore.loadSession(axolotlAddress);
|
||||
|
||||
if (record == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user