|
|
|
@ -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;
|
|
|
|
@ -81,6 +82,12 @@ public class RetrieveProfileJob extends ContextJob implements InjectableType {
|
|
|
|
|
{
|
|
|
|
|
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)
|
|
|
|
|