Forgot checking for our own devices

pull/1222/head
Mikunj 5 years ago
parent 3159baebfa
commit 2a1afa9fe7

@ -224,7 +224,7 @@
return !!(this.id && this.id.match(/^rss:/)); return !!(this.id && this.id.match(/^rss:/));
}, },
isBlocked() { isBlocked() {
if (this.isMe()) { if (!this.id || this.isMe()) {
return false; return false;
} }

@ -97,6 +97,11 @@ function unpad(paddedData: ArrayBuffer): ArrayBuffer {
} }
export async function isBlocked(number: string) { export async function isBlocked(number: string) {
const ourDevice = await MultiDeviceProtocol.isOurDevice(number);
if (ourDevice) {
return false;
}
const primary = await MultiDeviceProtocol.getPrimaryDevice(number); const primary = await MultiDeviceProtocol.getPrimaryDevice(number);
return ( return (
BlockedNumberController.isBlocked(primary) || BlockedNumberController.isBlocked(primary) ||

Loading…
Cancel
Save