diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 5f4873b6fe22..717c25113e22 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -36929,9 +36929,9 @@ function MessageReceiver(url, username, password, signalingKey, attachment_serve this.password = password; this.server = new TextSecureServer(url, username, password, attachment_server_url); - var unencoded = textsecure.utils.unencodeNumber(username); - this.number = unencoded[0]; - this.deviceId = unencoded[1]; + var address = libsignal.SignalProtocolAddress.fromString(username); + this.number = address.getName(); + this.deviceId = address.getDeviceId(); } MessageReceiver.prototype = new textsecure.EventTarget(); diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index a788e9f28f25..2a86a0adcb98 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -9,9 +9,9 @@ function MessageReceiver(url, username, password, signalingKey, attachment_serve this.password = password; this.server = new TextSecureServer(url, username, password, attachment_server_url); - var unencoded = textsecure.utils.unencodeNumber(username); - this.number = unencoded[0]; - this.deviceId = unencoded[1]; + var address = libsignal.SignalProtocolAddress.fromString(username); + this.number = address.getName(); + this.deviceId = address.getDeviceId(); } MessageReceiver.prototype = new textsecure.EventTarget();