Skip to content
Snippets Groups Projects
Commit e904107b authored by Alexey Lunin's avatar Alexey Lunin
Browse files

Added a method identityPullAvatarFromGravatar

parent a172c3b8
No related branches found
No related tags found
1 merge request!22Modify usage of Gravatar
......@@ -610,6 +610,36 @@ const connection = Penpal.connectToParent({
return responseToClient;
},
identityPullAvatarFromGravatar() {
return new Penpal.Promise(result => {
const authenticationPublicKey = localStorage.getItem("authenticatedIdentity");
if (authenticationPublicKey === null) {
result({"data" : "",
"code" : "400",
"status" : "Identity not authenticated"
})
}
if (window.loadedIdentities[authenticationPublicKey] === null) {
result({"data" : "",
"code" : "400",
"status" : "Identity not authenticated"
})
}
var success = extendPinCodeTtl(authenticationPublicKey);
if(success === false) {
result({"data" : "",
"code" : "400",
"status" : "Identity not authenticated"
})
}
executeRestfulFunction("private", viamApi, viamApi.identityPullAvatarFromGravatar).then(executeResult => {
result(executeResult);
});
});
},
identityAddNewDevice() {
return new Penpal.Promise(result => {
const authenticationPublicKey = localStorage.getItem("authenticatedIdentity");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment