mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Fix addDevice
This commit is contained in:
parent
08a217108a
commit
15568512b1
1 changed files with 3 additions and 3 deletions
|
@ -290,7 +290,7 @@ class Manager implements Signal {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addDeviceLink(URI linkUri) throws IOException, InvalidKeyException {
|
public void addDeviceLink(URI linkUri) throws IOException, InvalidKeyException {
|
||||||
Map<String, String> query = getQueryMap(linkUri.getQuery());
|
Map<String, String> query = getQueryMap(linkUri.getRawQuery());
|
||||||
String deviceIdentifier = query.get("uuid");
|
String deviceIdentifier = query.get("uuid");
|
||||||
String publicKeyEncoded = query.get("pub_key");
|
String publicKeyEncoded = query.get("pub_key");
|
||||||
|
|
||||||
|
@ -300,10 +300,10 @@ class Manager implements Signal {
|
||||||
|
|
||||||
ECPublicKey deviceKey = Curve.decodePoint(Base64.decode(publicKeyEncoded), 0);
|
ECPublicKey deviceKey = Curve.decodePoint(Base64.decode(publicKeyEncoded), 0);
|
||||||
|
|
||||||
addDeviceLink(deviceIdentifier, deviceKey);
|
addDevice(deviceIdentifier, deviceKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addDeviceLink(String deviceIdentifier, ECPublicKey deviceKey) throws IOException, InvalidKeyException {
|
private void addDevice(String deviceIdentifier, ECPublicKey deviceKey) throws IOException, InvalidKeyException {
|
||||||
IdentityKeyPair identityKeyPair = signalProtocolStore.getIdentityKeyPair();
|
IdentityKeyPair identityKeyPair = signalProtocolStore.getIdentityKeyPair();
|
||||||
String verificationCode = accountManager.getNewDeviceVerificationCode();
|
String verificationCode = accountManager.getNewDeviceVerificationCode();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue