mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Do not run prekey jobs if you're not registered.
This commit is contained in:
@@ -66,7 +66,7 @@ public class CreateSignedPreKeyJob extends BaseJob {
|
||||
|
||||
@Override
|
||||
public void onRun() throws IOException {
|
||||
if (!SignalStore.account().isRegistered()) {
|
||||
if (!SignalStore.account().isRegistered() || SignalStore.account().getAci() == null || SignalStore.account().getPni() == null) {
|
||||
Log.w(TAG, "Not yet registered...");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class RefreshPreKeysJob extends BaseJob {
|
||||
|
||||
@Override
|
||||
public void onRun() throws IOException {
|
||||
if (!SignalStore.account().isRegistered()) {
|
||||
if (!SignalStore.account().isRegistered() || SignalStore.account().getAci() == null || SignalStore.account().getPni() == null) {
|
||||
Log.w(TAG, "Not registered. Skipping.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,11 @@ public class RotateSignedPreKeyJob extends BaseJob {
|
||||
|
||||
@Override
|
||||
public void onRun() throws Exception {
|
||||
if (!SignalStore.account().isRegistered() || SignalStore.account().getAci() == null || SignalStore.account().getPni() == null) {
|
||||
Log.w(TAG, "Not registered. Skipping.");
|
||||
return;
|
||||
}
|
||||
|
||||
Log.i(TAG, "Rotating signed prekey...");
|
||||
|
||||
ACI aci = SignalStore.account().getAci();
|
||||
|
||||
Reference in New Issue
Block a user