Report some information when importing messages and discover an old verification bug.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4293 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-05-11 00:22:42 +00:00
parent 251556ebed
commit ed4faedcd7
4 changed files with 27 additions and 8 deletions

View File

@ -642,7 +642,15 @@ 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);
return tf_ssb_verify_strip_and_store_message(ssb, argv[0]) ? JS_TRUE : JS_FALSE;
bool is_new = false;
if (tf_ssb_verify_strip_and_store_message(ssb, argv[0], &is_new))
{
return is_new ? JS_TRUE : JS_FALSE;
}
else
{
return JS_UNDEFINED;
}
}
typedef struct _broadcasts_t