Skip to content

Commit

Permalink
WHISTLE-11: dialyzer updates and use the proper json object
Browse files Browse the repository at this point in the history
  • Loading branch information
James Aimonetti committed Jul 30, 2012
1 parent 3f39720 commit 014f97f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions whistle_apps/apps/notify/src/notify_vm.erl
Expand Up @@ -24,9 +24,9 @@
-spec init/0 :: () -> 'ok'.
init() ->
%% ensure the vm template can compile, otherwise crash the processes
notify_util:compile_default_text_template(?DEFAULT_TEXT_TMPL, ?MOD_CONFIG_CAT),
notify_util:compile_default_html_template(?DEFAULT_HTML_TMPL, ?MOD_CONFIG_CAT),
notify_util:compile_default_subject_template(?DEFAULT_SUBJ_TMPL, ?MOD_CONFIG_CAT),
{ok, _} = notify_util:compile_default_text_template(?DEFAULT_TEXT_TMPL, ?MOD_CONFIG_CAT),
{ok, _} = notify_util:compile_default_html_template(?DEFAULT_HTML_TMPL, ?MOD_CONFIG_CAT),
{ok, _} = notify_util:compile_default_subject_template(?DEFAULT_SUBJ_TMPL, ?MOD_CONFIG_CAT),
lager:debug("init done for ~s", [?MODULE]).

-spec handle_req/2 :: (wh_json:json_object(), proplist()) -> 'ok'.
Expand Down Expand Up @@ -97,7 +97,7 @@ create_template_props(Event, Docs, Account) ->
,{<<"to_realm">>, wh_json:get_value(<<"To-Realm">>, Event)}
,{<<"voicemail_box">>, wh_json:get_value(<<"Voicemail-Box">>, Event)}
,{<<"voicemail_media">>, wh_json:get_value(<<"Voicemail-Name">>, Event)}
,{<<"voicemail_transcription">>, wh_json:get_value(<<"Voicemail-Transcription">>, JObj)}
,{<<"voicemail_transcription">>, wh_json:get_value(<<"Voicemail-Transcription">>, Event)}
,{<<"call_id">>, wh_json:get_value(<<"Call-ID">>, Event)}
]}
,{<<"account_db">>, wh_json:get_value(<<"pvt_account_db">>, Account)}
Expand All @@ -111,7 +111,7 @@ create_template_props(Event, Docs, Account) ->
%%--------------------------------------------------------------------
-spec build_and_send_email/5 :: (iolist(), iolist(), iolist(), ne_binary() | [ne_binary(),...], proplist()) -> 'ok'.
build_and_send_email(TxtBody, HTMLBody, Subject, To, Props) when is_list(To) ->
[build_and_send_email(TxtBody, HTMLBody, Subject, T, Props) || T <- To],
_ = [build_and_send_email(TxtBody, HTMLBody, Subject, T, Props) || T <- To],
ok;
build_and_send_email(TxtBody, HTMLBody, Subject, To, Props) ->
Voicemail = props:get_value(<<"voicemail">>, Props),
Expand Down

0 comments on commit 014f97f

Please sign in to comment.