# HG changeset patch # User Kim Alvefur # Date 1613512184 -3600 # Node ID e13eb0f851c8fcc719c5abaaeec6b6bcb71eb076 # Parent 2f5e52d6792865af1df7fc3814c985c7f58f777e mod_smacks: Explicitly request ack when leaving CSI-inactive mode There may be a lot of unacked stanzas in the queue, might as well... diff -r 2f5e52d67928 -r e13eb0f851c8 mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Tue Feb 16 21:33:39 2021 +0100 +++ b/mod_smacks/mod_smacks.lua Tue Feb 16 22:49:44 2021 +0100 @@ -2,7 +2,7 @@ -- -- Copyright (C) 2010-2015 Matthew Wild -- Copyright (C) 2010 Waqas Hussain --- Copyright (C) 2012-2015 Kim Alvefur +-- Copyright (C) 2012-2021 Kim Alvefur -- Copyright (C) 2012 Thijs Alkemade -- Copyright (C) 2014 Florian Zeitz -- Copyright (C) 2016-2020 Thilo Molitor @@ -641,6 +641,10 @@ module:hook_stanza(xmlns_sm2, "resume", function (session, stanza) return handle_resume(session, stanza, xmlns_sm2); end); module:hook_stanza(xmlns_sm3, "resume", function (session, stanza) return handle_resume(session, stanza, xmlns_sm3); end); +module:hook("csi-client-active", function (event) + request_ack_if_needed(event.origin, true, "csi-active", nil); +end); + local function handle_read_timeout(event) local session = event.session; if session.smacks then