diff options
author | Thialfihar <thi@thialfihar.org> | 2014-05-14 14:07:44 +0200 |
---|---|---|
committer | Thialfihar <thi@thialfihar.org> | 2014-05-14 14:28:13 +0200 |
commit | f4a8e71c338c03642514aba2026156d541d3eab8 (patch) | |
tree | e072dbc645afd2f30ac3b03f4185789524ae5403 /OpenKeychain/src/main/java/org/sufficientlysecure | |
parent | 638554f2560b3c5fd36ca9b4ba205cb5a999b84b (diff) | |
download | open-keychain-f4a8e71c338c03642514aba2026156d541d3eab8.tar.gz open-keychain-f4a8e71c338c03642514aba2026156d541d3eab8.tar.bz2 open-keychain-f4a8e71c338c03642514aba2026156d541d3eab8.zip |
Make keybase lookup works for key ids starting with 0x
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/KeybaseKeyServer.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/KeybaseKeyServer.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/KeybaseKeyServer.java index 7ffe123c0..442cecef2 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/KeybaseKeyServer.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/KeybaseKeyServer.java @@ -41,6 +41,11 @@ public class KeybaseKeyServer extends KeyServer { InsufficientQuery { ArrayList<ImportKeysListEntry> results = new ArrayList<ImportKeysListEntry>(); + if (query.startsWith("0x")) { + // cut off "0x" if a user is searching for a key id + query = query.substring(2); + } + JSONObject fromQuery = getFromKeybase("_/api/1.0/user/autocomplete.json?q=", query); try { @@ -158,4 +163,4 @@ public class KeybaseKeyServer extends KeyServer { public void add(String armoredKey) throws AddKeyException { throw new AddKeyException(); } -}
\ No newline at end of file +} |