25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Send ping from server, not bare user JID (#3658)

This commit is contained in:
Badlop 2021-08-04 10:25:39 +02:00
parent ebf03a3745
commit b0da69f050

View File

@ -154,7 +154,7 @@ handle_info({iq_reply, timeout, JID}, State) ->
{noreply, State#state{timers = Timers}};
handle_info({timeout, _TRef, {ping, JID}}, State) ->
Host = State#state.host,
From = jid:remove_resource(JID),
From = jid:make(Host),
IQ = #iq{from = From, to = JID, type = get, sub_els = [#ping{}]},
ejabberd_router:route_iq(IQ, JID,
gen_mod:get_module_proc(Host, ?MODULE),