mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 03:25:05 -05:00
Add github, twitter, website info for keybase keys
The very point of keybase.io is the identification and proven link to those identities, so it should be nice to have them. The display is a bit basic still, as it just adds them as userIds, I'm sure this can be prettified, perhaps with logos?
This commit is contained in:
parent
2480844884
commit
73acb69208
@ -115,6 +115,23 @@ public class KeybaseKeyServer extends KeyServer {
|
||||
ArrayList<String> userIds = new ArrayList<String>();
|
||||
String name = fullName + " <keybase.io/" + keybaseId + ">";
|
||||
userIds.add(name);
|
||||
try {
|
||||
userIds.add("github.com/" + JWalk.getString(match, "components", "github", "val"));
|
||||
} catch (JSONException e) {
|
||||
// ignore
|
||||
}
|
||||
try {
|
||||
userIds.add("twitter.com/" + JWalk.getString(match, "components", "twitter", "val"));
|
||||
} catch (JSONException e) {
|
||||
// ignore
|
||||
}
|
||||
try {
|
||||
JSONArray array = JWalk.getArray(match, "components", "websites");
|
||||
JSONObject website = array.getJSONObject(0);
|
||||
userIds.add(JWalk.getString(website, "val"));
|
||||
} catch (JSONException e) {
|
||||
// ignore
|
||||
}
|
||||
entry.setUserIds(userIds);
|
||||
entry.setPrimaryUserId(name);
|
||||
return entry;
|
||||
|
Loading…
Reference in New Issue
Block a user