|
|
|
@ -52,6 +52,7 @@ import org.thoughtcrime.securesms.util.ListenableFutureTask;
|
|
|
|
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
|
|
|
|
import org.thoughtcrime.securesms.util.Util;
|
|
|
|
|
import org.whispersystems.libsignal.util.guava.Optional;
|
|
|
|
|
import org.whispersystems.signalservice.loki.protocol.multidevice.MultiDeviceProtocol;
|
|
|
|
|
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
@ -554,8 +555,13 @@ public class Recipient implements RecipientModifiedListener {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public synchronized boolean isBlocked() {
|
|
|
|
|
String masterPublicKey = MultiDeviceProtocol.shared.getMasterDevice(this.address.serialize());
|
|
|
|
|
if (masterPublicKey != null) {
|
|
|
|
|
return Recipient.from(context, Address.fromSerialized(masterPublicKey), false).blocked;
|
|
|
|
|
} else {
|
|
|
|
|
return blocked;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setBlocked(boolean blocked) {
|
|
|
|
|
synchronized (this) {
|
|
|
|
|