diff --git a/src/mod_shared_roster_ldap.erl b/src/mod_shared_roster_ldap.erl index 97bc710c9..93c08e0c3 100644 --- a/src/mod_shared_roster_ldap.erl +++ b/src/mod_shared_roster_ldap.erl @@ -409,9 +409,10 @@ get_member_jid(#state{user_jid_attr = UserJIDAttr, user_uid = UIDAttr} = State, [] -> {error, error}; [#eldap_entry{attributes = [{UserJIDAttr, [MemberJID | _]}]} | _] -> - case jid:decode(MemberJID) of - error -> {error, Host}; + try jid:decode(MemberJID) of #jid{luser = U, lserver = S} -> {U, S} + catch + error:{bad_jid, _} -> {error, Host} end end.