From 2d60f98e933843ad339ac42ae20a33014a76ee0e Mon Sep 17 00:00:00 2001 From: AsamK Date: Wed, 18 May 2022 10:45:53 +0200 Subject: [PATCH] Keep unrestricted unidentified access if it was set before --- .../java/org/asamk/signal/manager/storage/SignalAccount.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java b/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java index 7b5411e6..33b9e80c 100644 --- a/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java +++ b/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java @@ -1302,8 +1302,8 @@ public class SignalAccount implements Closeable { } public boolean isUnrestrictedUnidentifiedAccess() { - // TODO make configurable - return false; + final var profile = getProfileStore().getProfile(getSelfRecipientId()); + return profile != null && profile.getUnidentifiedAccessMode() == Profile.UnidentifiedAccessMode.UNRESTRICTED; } public boolean isDiscoverableByPhoneNumber() {