diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 9e52134a9..9f47463db 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38485,9 +38485,8 @@ OutgoingMessage.prototype = { var handleResult = function(response) { return Promise.all(response.devices.map(function(device) { device.identityKey = response.identityKey; - device.encodedNumber = number + "." + device.deviceId; 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); return builder.processPreKey(device).catch(function(error) { if (error.message === "Identity key changed") { diff --git a/libtextsecure/outgoing_message.js b/libtextsecure/outgoing_message.js index 784c4ddfe..6db428c54 100644 --- a/libtextsecure/outgoing_message.js +++ b/libtextsecure/outgoing_message.js @@ -47,9 +47,8 @@ OutgoingMessage.prototype = { var handleResult = function(response) { return Promise.all(response.devices.map(function(device) { device.identityKey = response.identityKey; - device.encodedNumber = number + "." + device.deviceId; 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); return builder.processPreKey(device).catch(function(error) { if (error.message === "Identity key changed") {