From 95935f70ee18bdc890a270b18173271693cb21db Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 3 May 2016 22:56:29 -0700 Subject: [PATCH] Remove relay check from sendmessage We don't currently store any relay information about devices, and // FREEBIE --- js/libtextsecure.js | 10 ---------- libtextsecure/outgoing_message.js | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index c867d060..322e233a 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38572,12 +38572,6 @@ OutgoingMessage.prototype = { if (devicesForNumber.length == 0) { return this.registerError(number, "Got empty device list when loading device keys", null); } - var relay = devicesForNumber[0].relay; - for (var i=1; i < devicesForNumber.length; ++i) { - if (devicesForNumber[i].relay !== relay) { - throw new Error("Mismatched relays for number " + number); - } - } return this.doSendMessage(number, devicesForNumber, recurse); }.bind(this)); }.bind(this); @@ -38686,10 +38680,6 @@ OutgoingMessage.prototype = { destinationRegistrationId: registrationId }; - if (device.relay !== undefined) { - json.relay = device.relay; - } - var content = btoa(encryptedMsg.body); if (this.legacy) { json.body = content; diff --git a/libtextsecure/outgoing_message.js b/libtextsecure/outgoing_message.js index dc88368a..9691d684 100644 --- a/libtextsecure/outgoing_message.js +++ b/libtextsecure/outgoing_message.js @@ -38,12 +38,6 @@ OutgoingMessage.prototype = { if (devicesForNumber.length == 0) { return this.registerError(number, "Got empty device list when loading device keys", null); } - var relay = devicesForNumber[0].relay; - for (var i=1; i < devicesForNumber.length; ++i) { - if (devicesForNumber[i].relay !== relay) { - throw new Error("Mismatched relays for number " + number); - } - } return this.doSendMessage(number, devicesForNumber, recurse); }.bind(this)); }.bind(this); @@ -152,10 +146,6 @@ OutgoingMessage.prototype = { destinationRegistrationId: registrationId }; - if (device.relay !== undefined) { - json.relay = device.relay; - } - var content = btoa(encryptedMsg.body); if (this.legacy) { json.body = content;