Skip to content

Commit

Permalink
force jsoned string
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax committed Jun 13, 2024
1 parent 971bf06 commit aef0479
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions core/pbcc_actions_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) - "
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions core/pubnub_actions_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) - "
Expand Down
2 changes: 1 addition & 1 deletion core/pubnub_actions_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit aef0479

Please sign in to comment.