Software /
code /
prosody
Diff
plugins/mod_csi_simple.lua @ 11918:2dc3bc5e137a
mod_csi_simple: Fire event when flushing due to client activity
So that the same things happen as when triggered by an outgoing stanza
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Nov 2021 00:39:10 +0100 |
parent | 11916:5dae9262f81f |
child | 11919:fae5441fc6cf |
line wrap: on
line diff
--- a/plugins/mod_csi_simple.lua Tue Nov 16 16:06:41 2021 +0100 +++ b/plugins/mod_csi_simple.lua Thu Nov 18 00:39:10 2021 +0100 @@ -141,6 +141,8 @@ local function flush_buffer(data, session) session.log("debug", "Flushing buffer (%s; queue size is %d)", "client activity", session.csi_counter); + session.state = "flushing"; + module:fire_event("csi-flushing", { session = session }); flush_reasons:with_labels("client activity"):add(1); if session.csi_measure_buffer_hold then session.csi_measure_buffer_hold();