26
1
mirror of https://github.com/processone/ejabberd.git synced 2025-01-03 18:02:28 +01:00

Fix force_update_presence

This commit is contained in:
Evgeniy Khramtsov 2015-08-20 19:15:16 +03:00 committed by Christophe Romain
parent 41d65f8fe2
commit c7750689e8
2 changed files with 3 additions and 3 deletions

View File

@ -1741,8 +1741,8 @@ handle_info({route_xmlstreamelement, El}, _StateName, StateData) ->
{next_state, NStateName, NStateData, _Timeout} = {next_state, NStateName, NStateData, _Timeout} =
session_established({xmlstreamelement, El}, StateData), session_established({xmlstreamelement, El}, StateData),
fsm_next_state(NStateName, NStateData); fsm_next_state(NStateName, NStateData);
handle_info({force_update_presence, LUser}, StateName, handle_info({force_update_presence, LUser, LServer}, StateName,
#state{user = LUser, server = LServer} = StateData) -> #state{jid = #jid{luser = LUser, lserver = LServer}} = StateData) ->
NewStateData = case StateData#state.pres_last of NewStateData = case StateData#state.pres_last of
#xmlel{name = <<"presence">>} -> #xmlel{name = <<"presence">>} ->
PresenceEl = PresenceEl =

View File

@ -741,7 +741,7 @@ force_update_presence({LUser, LServer}) ->
Mod = get_sm_backend(), Mod = get_sm_backend(),
Ss = Mod:get_sessions(LUser, LServer), Ss = Mod:get_sessions(LUser, LServer),
lists:foreach(fun (#session{sid = {_, Pid}}) -> lists:foreach(fun (#session{sid = {_, Pid}}) ->
Pid ! {force_update_presence, LUser} Pid ! {force_update_presence, LUser, LServer}
end, end,
Ss). Ss).