- rc = (status < 0 ? afb_wsj1_reply_error_j : afb_wsj1_reply_ok_j)(
- wsreq->msgj1, obj, afb_context_sent_token(&wsreq->xreq.context));
+ /* create the reply */
+ reply = afb_msg_json_reply(object, error, info, &xreq->context);
+
+ rc = (error ? afb_wsj1_reply_error_j : afb_wsj1_reply_ok_j)(
+ wsreq->msgj1, reply, afb_context_sent_token(&wsreq->xreq.context));