Make blocking take into account multi device

This commit is contained in:
nielsandriesse 2020-07-17 14:56:01 +10:00
parent f97f4d071d
commit 68821b98aa

View File

@ -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,7 +555,12 @@ public class Recipient implements RecipientModifiedListener {
}
public synchronized boolean isBlocked() {
return blocked;
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) {