From 0492ca5d35bb68c9def738fef469d0c312aaa8a9 Mon Sep 17 00:00:00 2001 From: sennui Date: Tue, 5 May 2020 12:02:47 +0200 Subject: [PATCH] use OTP function to build path to cert dir --- apps/roster/src/api/push/ios.erl | 3 ++- sys.config | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/roster/src/api/push/ios.erl b/apps/roster/src/api/push/ios.erl index 8a8f01167..07a878027 100644 --- a/apps/roster/src/api/push/ios.erl +++ b/apps/roster/src/api/push/ios.erl @@ -75,7 +75,8 @@ send_push(Addr, Payload, Options, Attempt) -> end. path_to_pem_file(FileName) -> - iolist_to_binary([?APNS_CERT_DIR, FileName]). + PrivDir = code:priv_dir(roster), + filename:join([PrivDir,?APNS_CERT_DIR, FileName]). get_data_from_feature(SessionSettings, Key) -> case lists:keyfind(Key, #'Feature'.key, SessionSettings) of diff --git a/sys.config b/sys.config index 33bf2c289..bd21b7157 100644 --- a/sys.config +++ b/sys.config @@ -69,7 +69,7 @@ ]}, {push_api,[ {fcm_server_key,<<"AAAAAzb6_Zg:APA91bGN0jYv_4iqyk8IC4xUdPYXh0yPsTF9YYj_gd9oebRr_ZEoLuC5hCD9RfdqA3Y3AF_P_WbelqvzvgR3RsX_mHBLynV14Q6HakXAtrY_eWLK2xqamF2OC9uBXfKgxTFFqmyr1Kbw">>}, - {apns_cert_dir,<<"apps/roster/priv/apns_certificates/">>}, + {apns_cert_dir,<<"apns_certificates">>}, {apns_port,2195}]}, {job_delay, 60}, %% 1 mins {auth_ttl, 900}, %% 15 mins -- GitLab