From b6aedd330ed05c79d56d8fac40409c9bbde8c188 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Thu, 14 Sep 2017 16:46:12 -0700 Subject: [PATCH] Disable signal messaging if unregistered Fixes #6963 // FREEBIE --- src/org/thoughtcrime/securesms/ConversationActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index fedfe6179f..f1be5ed25e 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -1017,6 +1017,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity Context context = ConversationActivity.this; Recipient recipient = params[0]; RegisteredState registeredState = recipient.resolve().getRegistered(); + boolean signalEnabled = TextSecurePreferences.isPushRegistered(context); if (registeredState == RegisteredState.UNKNOWN) { 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