fix sendmessage
This commit is contained in:
@@ -1060,7 +1060,7 @@ int JS_ActorExists(const char *actor_id)
|
||||
return actor_exists(actor_id);
|
||||
}
|
||||
|
||||
const char *JS_SendMessage(const char *actor_id, WotaBuffer *wb)
|
||||
const char *JS_SendMessage(JSContext *ctx, WotaBuffer *wb)
|
||||
{
|
||||
if (!wb || !wb->data || wb->size == 0)
|
||||
return "Empty WOTA buffer";
|
||||
@@ -1072,7 +1072,7 @@ const char *JS_SendMessage(const char *actor_id, WotaBuffer *wb)
|
||||
blob_write_bytes(msg, wb->data, byte_len);
|
||||
blob_make_stone(msg);
|
||||
|
||||
const char *err = send_message(actor_id, msg);
|
||||
const char *err = send_message(ctx->id, msg);
|
||||
if (!err) {
|
||||
/* Success — send_message took ownership of the blob.
|
||||
Free the WotaBuffer internals since we consumed them. */
|
||||
|
||||
Reference in New Issue
Block a user