Fix default value for phone number sharing mode

Fixes #1002
This commit is contained in:
AsamK 2022-08-29 19:31:07 +02:00
parent ac8925b2bd
commit c7aa9834a9
2 changed files with 3 additions and 2 deletions

View file

@ -96,7 +96,7 @@ public class UnidentifiedAccessHelper {
private byte[] getSenderCertificateFor(final RecipientId recipientId) {
final var sharingMode = account.getConfigurationStore().getPhoneNumberSharingMode();
if (sharingMode == PhoneNumberSharingMode.EVERYBODY || (
if (sharingMode == null || sharingMode == PhoneNumberSharingMode.EVERYBODY || (
sharingMode == PhoneNumberSharingMode.CONTACTS
&& account.getContactStore().getContact(recipientId) != null
)) {

View file

@ -1545,7 +1545,8 @@ public class SignalAccount implements Closeable {
}
public boolean isDiscoverableByPhoneNumber() {
return configurationStore.getPhoneNumberUnlisted() == null || !configurationStore.getPhoneNumberUnlisted();
final var phoneNumberUnlisted = configurationStore.getPhoneNumberUnlisted();
return phoneNumberUnlisted == null || !phoneNumberUnlisted;
}
public void finishRegistration(final ACI aci, final PNI pni, final MasterKey masterKey, final String pin) {