mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Only set UNRESTRICTED mode if recipients have a non-null verifier.
Otherwise we could send UD messages to people with non-UD linked devices.
This commit is contained in:
parent
1ab3d57378
commit
bf9582c97e
@ -171,7 +171,7 @@ public class RetrieveProfileJob extends ContextJob implements InjectableType {
|
|||||||
RecipientDatabase recipientDatabase = DatabaseFactory.getRecipientDatabase(context);
|
RecipientDatabase recipientDatabase = DatabaseFactory.getRecipientDatabase(context);
|
||||||
byte[] profileKey = recipient.getProfileKey();
|
byte[] profileKey = recipient.getProfileKey();
|
||||||
|
|
||||||
if (unrestrictedUnidentifiedAccess) {
|
if (unrestrictedUnidentifiedAccess && unidentifiedAccessVerifier != null) {
|
||||||
Log.i(TAG, "Marking recipient UD status as unrestricted.");
|
Log.i(TAG, "Marking recipient UD status as unrestricted.");
|
||||||
recipientDatabase.setUnidentifiedAccessMode(recipient, UnidentifiedAccessMode.UNRESTRICTED);
|
recipientDatabase.setUnidentifiedAccessMode(recipient, UnidentifiedAccessMode.UNRESTRICTED);
|
||||||
} else if (profileKey == null || unidentifiedAccessVerifier == null) {
|
} else if (profileKey == null || unidentifiedAccessVerifier == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user