Skip to content

Commit

Permalink
Don't mark unauthorized unless we're registered.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Jan 5, 2023
1 parent bfba60b commit 073d5df
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.thoughtcrime.securesms.jobs.MarkerJob;
import org.thoughtcrime.securesms.jobs.PushDecryptMessageJob;
import org.thoughtcrime.securesms.jobs.PushProcessMessageJob;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
import org.thoughtcrime.securesms.stories.Stories;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.whispersystems.signalservice.api.SignalServiceMessageReceiver;
Expand Down Expand Up @@ -71,7 +72,7 @@ public boolean execute(long timeout) {
} catch (IOException e) {
Log.w(TAG, "Failed to retrieve messages. Resetting the SignalServiceMessageReceiver.", e);
ApplicationDependencies.resetSignalServiceMessageReceiver();
if (e instanceof AuthorizationFailedException) {
if (e instanceof AuthorizationFailedException && SignalStore.account().isRegistered() && SignalStore.account().getAci() != null) {
TextSecurePreferences.setUnauthorizedReceived(ApplicationDependencies.getApplication(), true);
}
return false;
Expand Down

0 comments on commit 073d5df

Please sign in to comment.