diff --git a/apps/roster/src/api/push/roster_apns_api.erl b/apps/roster/src/api/push/roster_apns_api.erl index 1e571ff7eac48715c194d6d1bc48007bacfb985e..7a1611818c5ed1a984db0fd189bc4f69c534ec60 100644 --- a/apps/roster/src/api/push/roster_apns_api.erl +++ b/apps/roster/src/api/push/roster_apns_api.erl @@ -275,7 +275,6 @@ pick_binary_config(SessionSettings, State) -> Name = pick_session_name(SessionSettings), orddict:fetch(Name, Configs). - pick_session_name(SessionSettings) -> Bundle = get_data_from_feature(SessionSettings, ?FKPN_BUNDLE), Gateway = get_data_from_feature(SessionSettings, ?FKPN_GATEWAY), @@ -283,12 +282,16 @@ pick_session_name(SessionSettings) -> case {CertType, Gateway} of {prod, <<"LIVE">>} -> apns_live; {prod, <<"SANDBOX">>} -> apns_sandbox_prod; - {dev, <<"SANDBOX">>} -> apns_sandbox_dev + {dev, <<"SANDBOX">>} -> apns_sandbox_dev; + {_ , _ } -> + ?LOG_INFO("Bad settings for push ~p", [SessionSettings]), + apns_sandbox_dev end. cert_type_from_bundle(<<"com.nynja.mobile.communicator">>) -> prod; cert_type_from_bundle(<<"com.nynja.rc.mobile.communicator">>) -> prod; -cert_type_from_bundle(<<"com.nynja.dev.mobile.communicator">>) -> dev. +cert_type_from_bundle(<<"com.nynja.dev.mobile.communicator">>) -> dev; +cert_type_from_bundle(_) -> dev. %% Sometimes used for test builds get_data_from_feature(SessionSettings, Key) -> case lists:keyfind(Key, #'Feature'.key, SessionSettings) of