Software /
code /
prosody
Changeset
8523:30671b378ab5
mod_bosh: Make into a normal module (fixes #402)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 13 Dec 2017 15:24:02 +0100 |
parents | 8522:073e517a1487 |
children | 8524:81fff93d3bc6 |
files | plugins/mod_bosh.lua |
diffstat | 1 files changed, 12 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_bosh.lua Fri Feb 16 08:23:26 2018 +0100 +++ b/plugins/mod_bosh.lua Wed Dec 13 15:24:02 2017 +0100 @@ -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 @@ </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; + }; +});