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
)) {
}
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) {