From 4382d43c220e7609d23b00603c748d99e7f2fedb Mon Sep 17 00:00:00 2001 From: lazedo Date: Mon, 6 Apr 2020 23:02:33 +0000 Subject: [PATCH] handle undefined presence-id in authn --- applications/ecallmgr/src/ecallmgr_fs_authn.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/applications/ecallmgr/src/ecallmgr_fs_authn.erl b/applications/ecallmgr/src/ecallmgr_fs_authn.erl index 652fd10c7b4..18c16dc3a3c 100644 --- a/applications/ecallmgr/src/ecallmgr_fs_authn.erl +++ b/applications/ecallmgr/src/ecallmgr_fs_authn.erl @@ -419,6 +419,8 @@ presence_id(AccountId, Endpoint) -> PresenceId = kzd_users:presence_id(Endpoint, kzd_users:email(Endpoint)), maybe_fix_presence_id(AccountId, PresenceId). +maybe_fix_presence_id(_AccountId, undefined) -> + undefined; maybe_fix_presence_id(AccountId, PresenceId) -> case binary:match(PresenceId, <<"@">>) of 'nomatch' -> fix_presence_id(AccountId, PresenceId);