From 15568512b1400d3696e43880a674e5d63f078cd7 Mon Sep 17 00:00:00 2001 From: AsamK Date: Sat, 16 Apr 2016 15:07:35 +0200 Subject: [PATCH] Fix addDevice --- src/main/java/org/asamk/signal/Manager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/asamk/signal/Manager.java b/src/main/java/org/asamk/signal/Manager.java index 47699c3f..3931f3e3 100644 --- a/src/main/java/org/asamk/signal/Manager.java +++ b/src/main/java/org/asamk/signal/Manager.java @@ -290,7 +290,7 @@ class Manager implements Signal { } public void addDeviceLink(URI linkUri) throws IOException, InvalidKeyException { - Map query = getQueryMap(linkUri.getQuery()); + Map query = getQueryMap(linkUri.getRawQuery()); String deviceIdentifier = query.get("uuid"); String publicKeyEncoded = query.get("pub_key"); @@ -300,10 +300,10 @@ class Manager implements Signal { 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(); String verificationCode = accountManager.getNewDeviceVerificationCode();