diff options
author | Kim Alvefur <zash@zash.se> | 2017-12-13 15:24:02 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-12-13 15:24:02 +0100 |
commit | c468196063ef69759758680038f583d8ed0aee21 (patch) | |
tree | 86057c5f198caad76f2b40fff64fd6cabd69d5f8 | |
parent | 6013ca9e240b4a0378513e83e4069a3ce67a0902 (diff) | |
download | prosody-c468196063ef69759758680038f583d8ed0aee21.tar.gz prosody-c468196063ef69759758680038f583d8ed0aee21.zip |
mod_bosh: Make into a normal module (fixes #402)
-rw-r--r-- | plugins/mod_bosh.lua | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 2525d975..d75a9e45 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -6,8 +6,6 @@ -- COPYING file in the source package for more information. -- -module:set_global(); -- Global module - local hosts = _G.hosts; local new_xmpp_stream = require "util.xmppstream".new; local sm = require "core.sessionmanager"; @@ -512,17 +510,15 @@ local GET_response = { </body></html>]]; }; -function module.add_host(module) - module:depends("http"); - module:provides("http", { - default_path = "/http-bind"; - route = { - ["GET"] = GET_response; - ["GET /"] = GET_response; - ["OPTIONS"] = handle_OPTIONS; - ["OPTIONS /"] = handle_OPTIONS; - ["POST"] = handle_POST; - ["POST /"] = handle_POST; - }; - }); -end +module:depends("http"); +module:provides("http", { + default_path = "/http-bind"; + route = { + ["GET"] = GET_response; + ["GET /"] = GET_response; + ["OPTIONS"] = handle_OPTIONS; + ["OPTIONS /"] = handle_OPTIONS; + ["POST"] = handle_POST; + ["POST /"] = handle_POST; + }; +}); |