mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 03:25:05 -05:00
List full keybase id or strong key id matches on top
This commit is contained in:
parent
f4a8e71c33
commit
d50e798c13
@ -55,10 +55,19 @@ public class KeybaseKeyServer extends KeyServer {
|
||||
|
||||
// only list them if they have a key
|
||||
if (JWalk.optObject(match, "components", "key_fingerprint") != null) {
|
||||
String keybaseId = JWalk.getString(match, "components", "username", "val");
|
||||
String fingerprint = JWalk.getString(match, "components", "key_fingerprint", "val");
|
||||
fingerprint = fingerprint.replace(" ", "").toUpperCase();
|
||||
|
||||
if (keybaseId.equals(query) || fingerprint.startsWith(query.toUpperCase())) {
|
||||
results.add(makeEntry(match));
|
||||
} else {
|
||||
results.add(makeEntry(match));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(Constants.TAG, "keybase result parsing error", e);
|
||||
throw new QueryException("Unexpected structure in keybase search result: " + e.getMessage());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user