From cb7868428228c033d4a8734daa2c0f7be77c78b9 Mon Sep 17 00:00:00 2001 From: Alan Evans Date: Fri, 10 May 2019 12:13:59 -0300 Subject: [PATCH] Ensure push groups cannot have isForceSmsSelection set. Fixes #8807 --- .../securesms/conversation/ConversationActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java index f3a496eace..bc8a4fc74f 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -1180,7 +1180,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity if (!isSecureText && !isPushGroupConversation()) sendButton.disableTransport(Type.TEXTSECURE); if (recipient.isPushGroupRecipient()) sendButton.disableTransport(Type.SMS); - if (recipient.isForceSmsSelection()) { + if (!recipient.isPushGroupRecipient() && recipient.isForceSmsSelection()) { sendButton.setDefaultTransport(Type.SMS); } else { if (isSecureText || isPushGroupConversation()) sendButton.setDefaultTransport(Type.TEXTSECURE); @@ -2226,7 +2226,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity recipientDatabase.setDefaultSubscriptionId(recipient, transportOption.getSimSubscriptionId().or(-1)); - recipientDatabase.setForceSmsSelection(recipient, recipient.getRegistered() == RegisteredState.REGISTERED && transportOption.isSms()); + if (!recipient.isPushGroupRecipient()) { + recipientDatabase.setForceSmsSelection(recipient, recipient.getRegistered() == RegisteredState.REGISTERED && transportOption.isSms()); + } return null; }