Use SignalProtocolAddress in MessageReceiver constructor
// FREEBIE
This commit is contained in:
parent
213b44935d
commit
9ecfe6acb0
2 changed files with 6 additions and 6 deletions
|
@ -36929,9 +36929,9 @@ function MessageReceiver(url, username, password, signalingKey, attachment_serve
|
||||||
this.password = password;
|
this.password = password;
|
||||||
this.server = new TextSecureServer(url, username, password, attachment_server_url);
|
this.server = new TextSecureServer(url, username, password, attachment_server_url);
|
||||||
|
|
||||||
var unencoded = textsecure.utils.unencodeNumber(username);
|
var address = libsignal.SignalProtocolAddress.fromString(username);
|
||||||
this.number = unencoded[0];
|
this.number = address.getName();
|
||||||
this.deviceId = unencoded[1];
|
this.deviceId = address.getDeviceId();
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageReceiver.prototype = new textsecure.EventTarget();
|
MessageReceiver.prototype = new textsecure.EventTarget();
|
||||||
|
|
|
@ -9,9 +9,9 @@ function MessageReceiver(url, username, password, signalingKey, attachment_serve
|
||||||
this.password = password;
|
this.password = password;
|
||||||
this.server = new TextSecureServer(url, username, password, attachment_server_url);
|
this.server = new TextSecureServer(url, username, password, attachment_server_url);
|
||||||
|
|
||||||
var unencoded = textsecure.utils.unencodeNumber(username);
|
var address = libsignal.SignalProtocolAddress.fromString(username);
|
||||||
this.number = unencoded[0];
|
this.number = address.getName();
|
||||||
this.deviceId = unencoded[1];
|
this.deviceId = address.getDeviceId();
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageReceiver.prototype = new textsecure.EventTarget();
|
MessageReceiver.prototype = new textsecure.EventTarget();
|
||||||
|
|
Loading…
Reference in a new issue