Ensure message is not FR

pull/641/head
sachaaaaa 5 years ago
parent 63fd72d971
commit 3d22abc9cf

@ -1299,7 +1299,7 @@ MessageReceiver.prototype.extend({
// eslint-disable-next-line no-bitwise // eslint-disable-next-line no-bitwise
const isUnpairingRequest = Boolean(message.flags & UNPAIRING_REQUEST); const isUnpairingRequest = Boolean(message.flags & UNPAIRING_REQUEST);
if (isUnpairingRequest) { if (!friendRequest && isUnpairingRequest) {
// TODO: move high-level pairing logic to libloki.multidevice.xx // TODO: move high-level pairing logic to libloki.multidevice.xx
const unpairingRequestIsLegit = async () => { const unpairingRequestIsLegit = async () => {
@ -1328,11 +1328,7 @@ MessageReceiver.prototype.extend({
); );
// our pubkey should NOT be in the primary device mapping // our pubkey should NOT be in the primary device mapping
if (found) { return !found;
return false;
}
return true;
}; };
const legit = await unpairingRequestIsLegit(); const legit = await unpairingRequestIsLegit();

Loading…
Cancel
Save