forked from cory/tildefriends
Trying to understand a lingering 'previous message doesn't exist.' And format.
This commit is contained in:
12
src/ssb.js.c
12
src/ssb.js.c
@ -374,8 +374,7 @@ static JSValue _tf_ssb_getActiveIdentity(JSContext* context, JSValueConst this_v
|
||||
const char* package_owner = JS_ToCString(context, argv[1]);
|
||||
const char* package_name = JS_ToCString(context, argv[2]);
|
||||
active_identity_work_t* work = tf_malloc(sizeof(active_identity_work_t));
|
||||
*work = (active_identity_work_t)
|
||||
{
|
||||
*work = (active_identity_work_t) {
|
||||
.request = { .data = work },
|
||||
.ssb = JS_GetOpaque(this_val, _tf_ssb_classId),
|
||||
.context = context,
|
||||
@ -419,7 +418,8 @@ static void _tf_ssb_getIdentityInfo_visit(const char* identity, void* data)
|
||||
request->names = tf_resize_vec(request->names, (request->count + 1) * sizeof(char*));
|
||||
request->identities[request->count] = tf_strdup(identity);
|
||||
request->names[request->count] = NULL;
|
||||
request->count++;;
|
||||
request->count++;
|
||||
;
|
||||
}
|
||||
|
||||
static void _tf_ssb_getIdentityInfo_work(uv_work_t* work)
|
||||
@ -438,7 +438,8 @@ static void _tf_ssb_getIdentityInfo_work(uv_work_t* work)
|
||||
" FROM messages "
|
||||
" JOIN identities ON messages.author = ids.value "
|
||||
" WHERE WHERE identities.user = ? AND json_extract(messages.content, '$.type') = 'about' AND content ->> 'about' = messages.author AND name IS NOT NULL) "
|
||||
"WHERE author_rank = 1 ", -1, &statement, NULL);
|
||||
"WHERE author_rank = 1 ",
|
||||
-1, &statement, NULL);
|
||||
if (request->result == SQLITE_OK)
|
||||
{
|
||||
if (sqlite3_bind_text(statement, 1, request->name, -1, NULL) == SQLITE_OK)
|
||||
@ -517,8 +518,7 @@ static JSValue _tf_ssb_getIdentityInfo(JSContext* context, JSValueConst this_val
|
||||
const char* package_owner = JS_ToCString(context, argv[1]);
|
||||
const char* package_name = JS_ToCString(context, argv[2]);
|
||||
identity_info_work_t* work = tf_malloc(sizeof(identity_info_work_t));
|
||||
*work = (identity_info_work_t)
|
||||
{
|
||||
*work = (identity_info_work_t) {
|
||||
.request = { .data = work },
|
||||
.ssb = JS_GetOpaque(this_val, _tf_ssb_classId),
|
||||
.context = context,
|
||||
|
Reference in New Issue
Block a user