Only set UNRESTRICTED mode if recipients have a non-null verifier.

Otherwise we could send UD messages to people with non-UD linked
devices.
pull/1/head
Greyson Parrelli 7 years ago
parent 1ab3d57378
commit bf9582c97e

@ -171,7 +171,7 @@ public class RetrieveProfileJob extends ContextJob implements InjectableType {
RecipientDatabase recipientDatabase = DatabaseFactory.getRecipientDatabase(context);
byte[] profileKey = recipient.getProfileKey();
if (unrestrictedUnidentifiedAccess) {
if (unrestrictedUnidentifiedAccess && unidentifiedAccessVerifier != null) {
Log.i(TAG, "Marking recipient UD status as unrestricted.");
recipientDatabase.setUnidentifiedAccessMode(recipient, UnidentifiedAccessMode.UNRESTRICTED);
} else if (profileKey == null || unidentifiedAccessVerifier == null) {

Loading…
Cancel
Save