Fix addDevice

This commit is contained in:
AsamK 2016-04-16 15:07:35 +02:00
parent 08a217108a
commit 15568512b1

View file

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