Software /
code /
prosody
Changeset
9651:989cf872d5c0 0.11
mod_csi: Set session.state to simplify CSI modules
Moved here from mod_csi_simple
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 27 Nov 2018 19:34:21 +0100 |
parents | 9650:db6bcafd76c9 |
children | 9652:a58b48268ecd 9653:91856829f18b |
files | plugins/mod_csi.lua plugins/mod_csi_simple.lua |
diffstat | 2 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_csi.lua Tue Nov 27 19:15:33 2018 +0100 +++ b/plugins/mod_csi.lua Tue Nov 27 19:34:21 2018 +0100 @@ -11,6 +11,7 @@ function refire_event(name) return function (event) if event.origin.username then + session.state = event.stanza.name; module:fire_event(name, event); return true; end
--- a/plugins/mod_csi_simple.lua Tue Nov 27 19:15:33 2018 +0100 +++ b/plugins/mod_csi_simple.lua Tue Nov 27 19:34:21 2018 +0100 @@ -71,7 +71,6 @@ module:hook("csi-client-inactive", function (event) local session = event.origin; - session.state = "inactive"; if session.pump then session.pump:pause(); else @@ -99,7 +98,6 @@ module:hook("csi-client-active", function (event) local session = event.origin; - session.state = "active"; if session.pump then session.pump:resume(); end