Use SignalProtocolAddress in MessageReceiver constructor
// FREEBIE
This commit is contained in:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user