Skip to content
Commits on Source (2)
......@@ -196,6 +196,7 @@ static int js_push_ipcmsg_event(ipc_message_t *msg)
duk_push_string(ctx, plural_suffix[p]);
duk_put_prop_string(ctx, idx, "suffix");
}
json_decref(json);
return 0;
}
......@@ -736,6 +737,7 @@ static int js_push_event(struct mwevent *ev)
*/
switch (ev->ev_type) {
case MWEV_TYPE_MSG:
duk_require_stack(ctx, 2);
duk_push_string(ctx, "message_received");
duk_put_prop_string(ctx, idx, "type");
ret = js_push_ipcmsg_event(ev->ev_data.msg);
......