Do not fetch profiles when unregistered.

This commit is contained in:
Greyson Parrelli 2021-05-06 19:08:41 -04:00
parent 03b65ce6dc
commit d1982cbc0a

View file

@ -237,6 +237,11 @@ public class RetrieveProfileJob extends BaseJob {
@Override
public void onRun() throws IOException, RetryLaterException {
if (!TextSecurePreferences.isPushRegistered(context)) {
Log.w(TAG, "Unregistered. Skipping.");
return;
}
Stopwatch stopwatch = new Stopwatch("RetrieveProfile");
RecipientDatabase recipientDatabase = DatabaseFactory.getRecipientDatabase(context);
Set<RecipientId> retries = new HashSet<>();