Skip to content

Commit

Permalink
properly convert from/to jobj (2600hz#3601)
Browse files Browse the repository at this point in the history
  • Loading branch information
icehess authored and k-anderson committed Apr 20, 2017
1 parent 9a703b8 commit 1c70a64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions applications/hangups/src/hangups_channel_destroy.erl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ maybe_add_hangup_specific(<<"UNALLOCATED_NUMBER">>, JObj) ->
maybe_add_hangup_specific(<<"NO_ROUTE_DESTINATION">>, JObj) ->
maybe_add_number_info(JObj);
maybe_add_hangup_specific(_HangupCause, JObj) ->
kz_json:to_proplist(JObj).
kz_json:recursive_to_proplist(JObj).

%%--------------------------------------------------------------------
%% @private
Expand All @@ -71,7 +71,7 @@ maybe_add_hangup_specific(_HangupCause, JObj) ->
-spec maybe_add_number_info(kz_call_event:doc()) -> kz_proplist().
maybe_add_number_info(JObj) ->
Destination = find_destination(JObj),
Props = kz_json:to_proplist(JObj),
Props = kz_json:recursive_to_proplist(JObj),
try knm_number:lookup_account(Destination) of
{'ok', AccountId, _Props} ->
Tree = build_account_tree(AccountId),
Expand Down
2 changes: 1 addition & 1 deletion core/kazoo_amqp/src/kz_notify.erl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ detailed_alert(Subject, Msg, Props, Headers)
detailed_alert(Subject, Msg, Props, Headers) ->
Notify = [{<<"Message">>, Msg}
,{<<"Subject">>, <<"System Alert: ", Subject/binary>>}
,{<<"Details">>, kz_json:from_list(Props)}
,{<<"Details">>, kz_json:from_list_recursive(Props)}
| Headers ++ kz_api:default_headers(?APP_VERSION, ?APP_NAME)
],
kz_amqp_worker:cast(Notify, fun kapi_notifications:publish_system_alert/1).
Expand Down

0 comments on commit 1c70a64

Please sign in to comment.