]> granicus.if.org Git - ejabberd/commitdiff
Make sure only jabber:x:event tag is present in offline event
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Tue, 25 Apr 2017 14:21:24 +0000 (17:21 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Tue, 25 Apr 2017 14:21:24 +0000 (17:21 +0300)
src/mod_offline.erl

index db2efb040b9d752fc8c13abc3821c4ebf878e4c0..1d4a639585742438e33bcc0ba95b39062d5b6d18 100644 (file)
@@ -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;
        _ ->