diff options
Diffstat (limited to 'src/mod_push_keepalive.erl')
-rw-r--r-- | src/mod_push_keepalive.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mod_push_keepalive.erl b/src/mod_push_keepalive.erl index 1122d84e1..5dc6a20b9 100644 --- a/src/mod_push_keepalive.erl +++ b/src/mod_push_keepalive.erl @@ -131,7 +131,7 @@ unregister_hooks(Host) -> -spec c2s_stanza(c2s_state(), xmpp_element() | xmlel(), term()) -> c2s_state(). c2s_stanza(#{push_enabled := true, mgmt_state := pending} = State, Pkt, _SendResult) -> - case mod_push:is_message_with_body(Pkt) of + case mod_push:is_incoming_chat_msg(Pkt) of true -> maybe_restore_resume_timeout(State); false -> @@ -142,7 +142,7 @@ c2s_stanza(State, _Pkt, _SendResult) -> -spec c2s_session_pending(c2s_state()) -> c2s_state(). c2s_session_pending(#{push_enabled := true, mgmt_queue := Queue} = State) -> - case mod_stream_mgmt:queue_find(fun mod_push:is_message_with_body/1, + case mod_stream_mgmt:queue_find(fun mod_push:is_incoming_chat_msg/1, Queue) of none -> State1 = maybe_adjust_resume_timeout(State), @@ -190,7 +190,7 @@ c2s_handle_cast(State, _Msg) -> c2s_handle_info(#{push_enabled := true, mgmt_state := pending, jid := JID} = State, {timeout, _, push_keepalive}) -> ?INFO_MSG("Waking ~s before session times out", [jid:encode(JID)]), - mod_push:notify(State, none), + mod_push:notify(State, none, undefined), {stop, State}; c2s_handle_info(State, _) -> State. @@ -235,7 +235,8 @@ wake_all(LServer) -> IgnoreResponse = fun(_) -> ok end, lists:foreach(fun({_, PushLJID, Node, XData}) -> mod_push:notify(LServer, PushLJID, Node, - XData, none, IgnoreResponse) + XData, none, undefined, + IgnoreResponse) end, Sessions); error -> error |