Use SignalProtocolAddress in MessageReceiver constructor

// FREEBIE
This commit is contained in:
lilia 2016-05-02 17:15:47 -07:00
parent 213b44935d
commit 9ecfe6acb0
2 changed files with 6 additions and 6 deletions

View file

@ -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();

View file

@ -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();