diff --git a/src/ssb.js.c b/src/ssb.js.c index 34538ef6..25d5c7b9 100644 --- a/src/ssb.js.c +++ b/src/ssb.js.c @@ -31,7 +31,13 @@ static JSValue _tf_ssb_createIdentity(JSContext* context, JSValueConst this_val, char public[512]; char private[512]; 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."); }