diff --git a/src/mod_offline.erl b/src/mod_offline.erl index db2efb040..1d4a63958 100644 --- a/src/mod_offline.erl +++ b/src/mod_offline.erl @@ -539,8 +539,8 @@ check_event(#message{from = From, to = To, id = ID} = Msg) -> #xevent{id = undefined, offline = false} -> true; #xevent{id = undefined, offline = true} -> - NewMsg = Msg#message{from = To, to = From, - sub_els = [#xevent{id = ID, offline = true}]}, + NewMsg = #message{from = To, to = From, + sub_els = [#xevent{id = ID, offline = true}]}, ejabberd_router:route(NewMsg), true; _ ->