What's the point of creating an identity if you don't return it?
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3948 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
1973030774
commit
6628a5c420
@ -31,7 +31,13 @@ static JSValue _tf_ssb_createIdentity(JSContext* context, JSValueConst this_val,
|
|||||||
char public[512];
|
char public[512];
|
||||||
char private[512];
|
char private[512];
|
||||||
tf_ssb_generate_keys_buffer(public, sizeof(public), private, sizeof(private));
|
tf_ssb_generate_keys_buffer(public, sizeof(public), private, sizeof(private));
|
||||||
if (!tf_ssb_db_identity_add(ssb, user, public, private))
|
if (tf_ssb_db_identity_add(ssb, user, public, private))
|
||||||
|
{
|
||||||
|
char id[513];
|
||||||
|
snprintf(id, sizeof(id), "@%s", public);
|
||||||
|
result = JS_NewString(context, id);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
result = JS_ThrowInternalError(context, "Unable to add identity.");
|
result = JS_ThrowInternalError(context, "Unable to add identity.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user