Return something from ssb.storeMessage.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4288 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-05-10 01:45:37 +00:00
parent 7da7890bb6
commit 8727fe00af
4 changed files with 6 additions and 5 deletions

View File

@ -919,7 +919,7 @@ static bool _tf_ssb_verify_and_strip_signature_internal(JSContext* context, JSVa
if (!verified)
{
//tf_printf("crypto_sign_verify_detached fail (r=%d)\n", r);
if (false)
if (true)
{
tf_printf("val=[%.*s]\n", (int)strlen(sigstr), sigstr);
tf_printf("sig=%.*s\n", (int)(sigkind - str), str);

View File

@ -642,8 +642,7 @@ static JSValue _tf_ssb_sqlAsync(JSContext* context, JSValueConst this_val, int a
static JSValue _tf_ssb_storeMessage(JSContext* context, JSValueConst this_val, int argc, JSValueConst* argv)
{
tf_ssb_t* ssb = JS_GetOpaque(this_val, _tf_ssb_classId);
tf_ssb_verify_strip_and_store_message(ssb, argv[0]);
return JS_UNDEFINED;
return tf_ssb_verify_strip_and_store_message(ssb, argv[0]) ? JS_TRUE : JS_FALSE;
}
typedef struct _broadcasts_t