Some ebt.replicate success.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3703 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2021-12-27 19:52:42 +00:00
parent efcada8e25
commit 3cddc524d1
3 changed files with 128 additions and 29 deletions

View File

@ -352,13 +352,18 @@ static JSValue _tf_ssb_rpc_send_json(JSContext* context, JSValueConst this_val,
JS_ToInt32(context, &request_number, request_val);
JS_FreeValue(context, request_val);
JSValue flags_val = JS_GetPropertyStr(context, this_val, "flags");
int32_t flags_number;
JS_ToInt32(context, &flags_number, flags_val);
JS_FreeValue(context, flags_val);
JSValue message_val = JS_JSONStringify(context, argv[0], JS_NULL, JS_NULL);
size_t size;
const char* message = JS_ToCStringLen(context, &size, message_val);
tf_ssb_connection_rpc_send(
connection,
k_ssb_rpc_flag_json | k_ssb_rpc_flag_stream,
k_ssb_rpc_flag_json | (flags_number & ~k_ssb_rpc_mask_type),
-request_number,
(const uint8_t*)message,
size,