mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Make blocking take into account multi device
This commit is contained in:
parent
f97f4d071d
commit
68821b98aa
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user