mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-28 15:20:46 +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.content.Context;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.crypto.storage.TextSecureIdentityKeyStore;
|
import org.thoughtcrime.securesms.crypto.storage.TextSecureIdentityKeyStore;
|
||||||
@ -81,6 +82,12 @@ public class RetrieveProfileJob extends ContextJob implements InjectableType {
|
|||||||
{
|
{
|
||||||
String number = Util.canonicalizeNumber(context, recipient.getNumber());
|
String number = Util.canonicalizeNumber(context, recipient.getNumber());
|
||||||
SignalServiceProfile profile = retrieveProfile(number);
|
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);
|
IdentityKey identityKey = new IdentityKey(Base64.decode(profile.getIdentityKey()), 0);
|
||||||
|
|
||||||
if (!DatabaseFactory.getIdentityDatabase(context)
|
if (!DatabaseFactory.getIdentityDatabase(context)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user