From f7b5afec51c6c1c51a0bbf4120c0fe7ea7ad0661 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 1 Dec 2009 20:02:00 +0000 Subject: [PATCH] Don't handle internally an IQ vCard if destination is full JID (EJAB-1045) SVN Revision: 2769 --- src/ejabberd_c2s.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 2cfeab38b..38807dd2d 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -1175,8 +1175,10 @@ handle_info({route, From, To, Packet}, StateName, StateData) -> #xmlel{attrs = Attrs} when ?IS_IQ(Packet) -> case exmpp_iq:is_request(Packet) of true -> + ToNode = exmpp_jid:node(To), + ToResource = exmpp_jid:resource(To), case exmpp_iq:get_request(Packet) of - #xmlel{ns = ?NS_VCARD} -> + #xmlel{ns = ?NS_VCARD} when (ToNode == <<"">>) or (ToResource == <<"">>) -> Host = StateData#state.server, case ets:lookup(sm_iqtable, {?NS_VCARD, Host}) of [{_, Module, Function, Opts}] ->