mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-19 19:48:27 +00:00
Null check just in case the profile comes back empty
// FREEBIE
This commit is contained in:
parent
172de96ce4
commit
0f6823d37e
@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.jobs;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.storage.TextSecureIdentityKeyStore;
|
||||
@ -79,9 +80,15 @@ public class RetrieveProfileJob extends ContextJob implements InjectableType {
|
||||
private void handleIndividualRecipient(Recipient recipient)
|
||||
throws IOException, InvalidKeyException, InvalidNumberException
|
||||
{
|
||||
String number = Util.canonicalizeNumber(context, recipient.getNumber());
|
||||
SignalServiceProfile profile = retrieveProfile(number);
|
||||
IdentityKey identityKey = new IdentityKey(Base64.decode(profile.getIdentityKey()), 0);
|
||||
String number = Util.canonicalizeNumber(context, recipient.getNumber());
|
||||
SignalServiceProfile profile = retrieveProfile(number);
|
||||
|
||||
if (TextUtils.isEmpty(profile.getIdentityKey())) {
|
||||
Log.w(TAG, "Identity key is missing on profile!");
|
||||
return;
|
||||
}
|
||||
|
||||
IdentityKey identityKey = new IdentityKey(Base64.decode(profile.getIdentityKey()), 0);
|
||||
|
||||
if (!DatabaseFactory.getIdentityDatabase(context)
|
||||
.getIdentity(recipient.getRecipientId())
|
||||
|
Loading…
x
Reference in New Issue
Block a user