Ensure push groups cannot have isForceSmsSelection set.

Fixes #8807
This commit is contained in:
Alan Evans 2019-05-10 12:13:59 -03:00 committed by GitHub
parent 67704612df
commit cb78684282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}