diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 7eaa480cd..2930036e4 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -1867,9 +1867,9 @@ presence_update(From, Packet, StateData) -> update_priority(NewPriority, Packet, StateData), FromUnavail = (StateData#state.pres_last == undefined), ?DEBUG("from unavail = ~p~n", [FromUnavail]), + NewStateData = StateData#state{pres_last = Packet, + pres_timestamp = Timestamp}, NewState = - NewStateData = StateData#state{pres_last = Packet, - pres_timestamp = Timestamp}, if FromUnavail -> ejabberd_hooks:run(user_available_hook,