Skip to content

Commit

Permalink
HELP-260010194: Add timestamp key to json object when handling push e…
Browse files Browse the repository at this point in the history
…vent (2600hz#6014)
  • Loading branch information
harenson authored and jamesaimonetti committed Sep 5, 2019
1 parent 8536be9 commit dfb0297
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion applications/pusher/src/pusher_listener.erl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ handle_push(JObj, _Props) ->
TokenType = kz_json:get_value(<<"Token-Type">>, JObj),
Module = kz_term:to_atom(<<"pm_",TokenType/binary>> , 'true'),
lager:debug("pushing for token ~s(~s) to module ~s", [Token, TokenType, Module]),
gen_server:cast(Module, {'push', JObj}).
JObj1 = kz_json:insert_value(<<"timestamp">>, kz_time:current_tstamp(), JObj),
gen_server:cast(Module, {'push', JObj1}).

-spec handle_reg_success(kz_json:object(), kz_term:proplist()) -> 'ok'.
handle_reg_success(JObj, _Props) ->
Expand Down

0 comments on commit dfb0297

Please sign in to comment.