Remove unneeded property from device object

// FREEBIE
This commit is contained in:
lilia 2016-05-13 17:10:48 -07:00
parent f8e176fd40
commit 055c0c323e
2 changed files with 2 additions and 4 deletions

View file

@ -38485,9 +38485,8 @@ OutgoingMessage.prototype = {
var handleResult = function(response) { var handleResult = function(response) {
return Promise.all(response.devices.map(function(device) { return Promise.all(response.devices.map(function(device) {
device.identityKey = response.identityKey; device.identityKey = response.identityKey;
device.encodedNumber = number + "." + device.deviceId;
if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) { if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) {
var address = libsignal.SignalProtocolAddress.fromString(device.encodedNumber); var address = new libsignal.SignalProtocolAddress(number, device.deviceId);
var builder = new libsignal.SessionBuilder(textsecure.storage.protocol, address); var builder = new libsignal.SessionBuilder(textsecure.storage.protocol, address);
return builder.processPreKey(device).catch(function(error) { return builder.processPreKey(device).catch(function(error) {
if (error.message === "Identity key changed") { if (error.message === "Identity key changed") {

View file

@ -47,9 +47,8 @@ OutgoingMessage.prototype = {
var handleResult = function(response) { var handleResult = function(response) {
return Promise.all(response.devices.map(function(device) { return Promise.all(response.devices.map(function(device) {
device.identityKey = response.identityKey; device.identityKey = response.identityKey;
device.encodedNumber = number + "." + device.deviceId;
if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) { if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) {
var address = libsignal.SignalProtocolAddress.fromString(device.encodedNumber); var address = new libsignal.SignalProtocolAddress(number, device.deviceId);
var builder = new libsignal.SessionBuilder(textsecure.storage.protocol, address); var builder = new libsignal.SessionBuilder(textsecure.storage.protocol, address);
return builder.processPreKey(device).catch(function(error) { return builder.processPreKey(device).catch(function(error) {
if (error.message === "Identity key changed") { if (error.message === "Identity key changed") {