Disable signal messaging if unregistered

Fixes #6963
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-09-14 16:46:12 -07:00
parent 989ec6a40a
commit b6aedd330e

View File

@ -1017,6 +1017,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
Context context = ConversationActivity.this; Context context = ConversationActivity.this;
Recipient recipient = params[0]; Recipient recipient = params[0];
RegisteredState registeredState = recipient.resolve().getRegistered(); RegisteredState registeredState = recipient.resolve().getRegistered();
boolean signalEnabled = TextSecurePreferences.isPushRegistered(context);
if (registeredState == RegisteredState.UNKNOWN) { if (registeredState == RegisteredState.UNKNOWN) {
try { try {
@ -1026,7 +1027,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
} }
} }
return new boolean[] {registeredState == RegisteredState.REGISTERED, Util.isDefaultSmsProvider(context)}; return new boolean[] {registeredState == RegisteredState.REGISTERED && signalEnabled,
Util.isDefaultSmsProvider(context)};
} }
@Override @Override