From 944791e88805fc6f7f18f3236648e1f061299833 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Wed, 9 Nov 2011 15:09:02 +1000 Subject: [PATCH] Fix presence problem after first unavailable (thanks to Christopher Faulet) (EJAB-1466) --- src/ejabberd_c2s.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index b093648d2..1c08b47c8 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -1785,10 +1785,10 @@ presence_update(From, Packet, StateData) -> FromUnavail = (StateData#state.pres_last == undefined) or StateData#state.pres_invis, ?DEBUG("from unavail = ~p~n", [FromUnavail]), + NewStateData = StateData#state{pres_last = Packet, + pres_invis = false, + pres_timestamp = Timestamp}, NewState = - NewStateData = StateData#state{pres_last = Packet, - pres_invis = false, - pres_timestamp = Timestamp}, if FromUnavail -> ejabberd_hooks:run(user_available_hook, -- 2.40.0