mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +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
cb7d8c8ead
commit
080922a3de
@ -1246,18 +1246,6 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
|
||||
"iq" ->
|
||||
IQ = jlib:iq_query_info(Packet),
|
||||
case IQ of
|
||||
#iq{xmlns = ?NS_VCARD} when (To#jid.luser == "") or (To#jid.lresource == "") ->
|
||||
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, IQ);
|
||||
[] ->
|
||||
Err = jlib:make_error_reply(
|
||||
Packet, ?ERR_FEATURE_NOT_IMPLEMENTED),
|
||||
ejabberd_router:route(To, From, Err)
|
||||
end,
|
||||
{false, Attrs, StateData};
|
||||
IQ when (is_record(IQ, iq)) or (IQ == reply) ->
|
||||
case privacy_check_packet(StateData, From, To, Packet, in) of
|
||||
allow ->
|
||||
|
Loading…
Reference in New Issue
Block a user