use canonical form of user signing keys on user profiles

pull/1/head
ansuz 4 years ago
parent b0f4978d1f
commit 99b102e75e

@ -6,6 +6,7 @@ define([
'/bower_components/nthen/index.js', '/bower_components/nthen/index.js',
'/common/sframe-common.js', '/common/sframe-common.js',
'/common/common-util.js', '/common/common-util.js',
'/common/common-hash.js',
'/common/common-interface.js', '/common/common-interface.js',
'/common/common-ui-elements.js', '/common/common-ui-elements.js',
'/common/common-realtime.js', '/common/common-realtime.js',
@ -33,6 +34,7 @@ define([
nThen, nThen,
SFCommon, SFCommon,
Util, Util,
Hash,
UI, UI,
UIElements, UIElements,
Realtime, Realtime,
@ -481,9 +483,7 @@ define([
APP.getEdPublic = function () { APP.getEdPublic = function () {
var metadataMgr = APP.common.getMetadataMgr(); var metadataMgr = APP.common.getMetadataMgr();
var privateData = metadataMgr.getPrivateData(); var privateData = metadataMgr.getPrivateData();
var name = data.name.toLowerCase().replace(/[^a-zA-Z0-9]+/g, "-"); var url = Hash.getPublicSigningKeyString(privateData.origin, data.name, data.edPublic);
var ed = data.edPublic.replace(/\//g, '-');
var url = privateData.origin + '/user/#/1/' + name + '/' + ed;
var success = Clipboard.copy(url); var success = Clipboard.copy(url);
if (success) { UI.log(Messages.shareSuccess); } if (success) { UI.log(Messages.shareSuccess); }
}; };

Loading…
Cancel
Save