mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
Remove dead code for NS_VCARD iq packets from ejabberd_c2s
For EJAB-1045, the special NS_VCARD block for handling incoming vcard iqs on behalf of clients has already been restricted to cases where the user or resource part of the recipient is empty. But then the packets should not have been routed to the c2s process anyway. This patch completely removes it.
This commit is contained in:
parent
351635d0aa
commit
860d8525ee
@ -1290,20 +1290,7 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
|
|||||||
#xmlel{attrs = Attrs} when ?IS_IQ(Packet) ->
|
#xmlel{attrs = Attrs} when ?IS_IQ(Packet) ->
|
||||||
case exmpp_iq:is_request(Packet) of
|
case exmpp_iq:is_request(Packet) of
|
||||||
true ->
|
true ->
|
||||||
ToNode = exmpp_jid:node(To),
|
|
||||||
ToResource = exmpp_jid:resource(To),
|
|
||||||
case exmpp_iq:get_request(Packet) of
|
case exmpp_iq:get_request(Packet) of
|
||||||
#xmlel{ns = ?NS_VCARD} when (ToNode == <<"">>) or (ToResource == <<"">>) ->
|
|
||||||
Host = StateData#state.server,
|
|
||||||
case ets:lookup(sm_iqtable, {?NS_VCARD, Host}) of
|
|
||||||
[{_, Module, Function, Opts}] ->
|
|
||||||
gen_iq_handler:handle(Host, Module, Function, Opts,
|
|
||||||
From, To, exmpp_iq:xmlel_to_iq(Packet));
|
|
||||||
[] ->
|
|
||||||
Res = exmpp_iq:error(Packet, 'feature-not-implemented'),
|
|
||||||
ejabberd_router:route(To, From, Res)
|
|
||||||
end,
|
|
||||||
{false, Attrs, StateData};
|
|
||||||
_ ->
|
_ ->
|
||||||
case privacy_check_packet(StateData, From, To, Packet, in) of
|
case privacy_check_packet(StateData, From, To, Packet, in) of
|
||||||
allow ->
|
allow ->
|
||||||
|
Loading…
Reference in New Issue
Block a user