Add: identity_proof
This commit is contained in:
parent
2b84a27cdc
commit
38cff550e1
|
@ -643,6 +643,7 @@ audio {
|
|||
.vis-data {
|
||||
font-size: 1rem !important;
|
||||
margin: 5px;
|
||||
user-select: none;
|
||||
}
|
||||
@keyframes jump {
|
||||
0% {
|
||||
|
|
|
@ -554,11 +554,15 @@ function showFrl(more, acct_id) {
|
|||
});
|
||||
}
|
||||
//Keybase
|
||||
function udAdd(start) {
|
||||
fetch(start, {
|
||||
function udAdd(acct_id, id, start) {
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
var at = localStorage.getItem("acct_" + acct_id + "_at");
|
||||
var proof = "https://" + domain + "/api/v1/accounts/" + id + "/identity_proofs"
|
||||
fetch(proof, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Accept': 'application/json'
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
},
|
||||
//body: JSON.stringify({})
|
||||
}).then(function (response) {
|
||||
|
@ -567,17 +571,11 @@ function udAdd(start) {
|
|||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function (json) {
|
||||
var fields = json.attachment;
|
||||
var fields = json;
|
||||
for (var i = 0; i < fields.length; i++) {
|
||||
if (fields[i].type == "IdentityProof") {
|
||||
if (fields[i].signatureAlgorithm == "keybase") {
|
||||
var html = '<a href="https://keybase.io/' + fields[i].name + '" target="_blank" class="cbadge teal waves-effect" style="max-width:200px;" title="' + lang.lang_hisdata_key.replace("{{set}}", escapeHTML(fields[i].signatureAlgorithm)) + '"><i class="fas fa-key" aria-hidden="true"></i>' + escapeHTML(fields[i].signatureAlgorithm) + ':' + escapeHTML(fields[i].name) + '</a>';
|
||||
} else {
|
||||
var html = '<span class="cbadge teal" style="max-width:200px;" title="' + lang.lang_hisdata_key.replace("{{set}}", escapeHTML(fields[i].signatureAlgorithm)) + '"><i class="fas fa-key" aria-hidden="true"></i>' + escapeHTML(fields[i].signatureAlgorithm) + ':' + escapeHTML(fields[i].name) + '</span>';
|
||||
}
|
||||
var html = '<a href="' + fields[i].proof_url + '" target="_blank" class="cbadge teal waves-effect" style="max-width:200px;" title="' + lang.lang_hisdata_key.replace("{{set}}", escapeHTML(fields[i].provider)) + '"><i class="fas fa-key" aria-hidden="true"></i>' + escapeHTML(fields[i].provider) + ':' + escapeHTML(fields[i].provider_username) + '</a>';
|
||||
$("#his-proof-prof").append(html)
|
||||
}
|
||||
}
|
||||
});
|
||||
fetch("https://notestock.osa-p.net/api/v1/isstock.json?id=" + start.replace("@", "users/"), {
|
||||
method: 'GET',
|
||||
|
|
|
@ -205,7 +205,7 @@ function udg(user, acct_id) {
|
|||
}
|
||||
todc();
|
||||
//外部データ取得(死かもしれないので)
|
||||
udAdd(json.url);
|
||||
udAdd(acct_id, user, json.url);
|
||||
});
|
||||
}
|
||||
function misskeyUdg(user, acct_id) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user