# HG changeset patch # User Emmanuel Gil Peyrot # Date 1625848213 -7200 # Node ID 05bea2f43d97bfba92d43e47083939b0f2f20195 # Parent 9a41cf08de241b7c4370040dfe72b6e42b814fd7 mod_csi: Obsolete this module, it is included in Prosody since 0.11 diff -r 9a41cf08de24 -r 05bea2f43d97 mod_csi/README.markdown --- a/mod_csi/README.markdown Fri Jul 09 18:27:18 2021 +0200 +++ b/mod_csi/README.markdown Fri Jul 09 18:30:13 2021 +0200 @@ -1,34 +1,8 @@ --- summary: Client State Indication support +superseded_by: mod_csi labels: -- 'Stage-Merged' +- 'Stage-Obsolete' ... -Introduction -============ - -This module implements [XEP-0352: Client State -Indication](http://xmpp.org/extensions/xep-0352.html), a way for mobile -clients to tell the server that they are sitting in someones pocket and -would rather not get some less urgent things pushed to it. - -This module has been merged into Prosody 0.11. Please see the -[mod_csi documentation](https://prosody.im/doc/modules/mod_csi) for more -information about how it is used. - -Configuration -============= - -There is no configuration for this module, just add it to -modules\_enabled as normal. - -Compatibility -============= - - ----- ------- - 0.9 Works - ----- ------- - 0.10 Works - ----- ------- - 0.11 Works (included) - ----- ------- +Since Prosody 0.11, this module is [included in Prosody](https://prosody.im/doc/modules/mod_csi), you will be redirected there shortly. diff -r 9a41cf08de24 -r 05bea2f43d97 mod_csi/mod_csi.lua --- a/mod_csi/mod_csi.lua Fri Jul 09 18:27:18 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -local st = require "util.stanza"; -local xmlns_csi = "urn:xmpp:csi:0"; -local csi_feature = st.stanza("csi", { xmlns = xmlns_csi }); - -module:hook("stream-features", function (event) - if event.origin.username then - event.features:add_child(csi_feature); - end -end); - -function refire_event(name) - return function (event) - if event.origin.username then - event.origin.state = event.stanza.name; - module:fire_event(name, event); - return true; - end - end; -end - -module:hook("stanza/"..xmlns_csi..":active", refire_event("csi-client-active")); -module:hook("stanza/"..xmlns_csi..":inactive", refire_event("csi-client-inactive")); -