diff --git a/core/pbcc_actions_api.c b/core/pbcc_actions_api.c index b99b9243..60778068 100644 --- a/core/pbcc_actions_api.c +++ b/core/pbcc_actions_api.c @@ -29,13 +29,13 @@ enum pubnub_res pbcc_form_the_action_object(struct pbcc_context* pb, switch(actype) { case pbactypReaction: - type_literal = "reaction"; + type_literal = "\"reaction\""; break; case pbactypReceipt: - type_literal = "receipt"; + type_literal = "\"receipt\""; break; case pbactypCustom: - type_literal = "custom"; + type_literal = "\"custom\""; break; default: PUBNUB_LOG_ERROR("pbcc_form_the_action_object(pbcc=%p) - " @@ -89,7 +89,7 @@ enum pubnub_res pbcc_form_the_action_object_str(struct pbcc_context* pb, } snprintf(obj_buffer, buffer_size, - "{\"type\":\"%s\",\"value\":%s,\"user_id\":\"%s\"}", + "{\"type\":%s,\"value\":%s,\"user_id\":\"%s\"}", action_type, *val, user_id); diff --git a/core/pubnub_actions_api.c b/core/pubnub_actions_api.c index fb101863..48505247 100644 --- a/core/pubnub_actions_api.c +++ b/core/pubnub_actions_api.c @@ -26,13 +26,13 @@ enum pubnub_res pubnub_add_message_action(pubnub_t *pb, switch(actype) { case pbactypReaction: - type_literal = "reaction"; + type_literal = "\"reaction\""; break; case pbactypReceipt: - type_literal = "receipt"; + type_literal = "\"receipt\""; break; case pbactypCustom: - type_literal = "custom"; + type_literal = "\"custom\""; break; default: PUBNUB_LOG_ERROR("pubnub_add_message_action(pbcc=%p) - " diff --git a/core/pubnub_actions_api.h b/core/pubnub_actions_api.h index 1a51a8c8..22cc6f58 100644 --- a/core/pubnub_actions_api.h +++ b/core/pubnub_actions_api.h @@ -55,7 +55,7 @@ PUBNUB_EXTERN PUBNUB_DEPRECATED enum pubnub_res pubnub_add_message_action(pubnub @param channel The channel on which action is referring to. @param message_timetoken The timetoken(unquoted) of a published message action is applying to - @param action_type String describing the action type (Max 15 characters without whitespaces) + @param action_type Jsoned string describing the action type (Max 15 characters without whitespaces) @param value Json string describing the action that is to be added @return #PNR_STARTED on success, an error otherwise */