# HG changeset patch # User Kim Alvefur # Date 1613884660 -3600 # Node ID 8eff5c7443956947a07ad2205e04f5136366c272 # Parent 226fd5d3a2959fb601ce6948c6e45df18bbd93ec mod_bosh: Use message template from mod_http_error Looking Good! And most importantly, consistent. diff -r 226fd5d3a295 -r 8eff5c744395 plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Sun Feb 21 06:15:59 2021 +0100 +++ b/plugins/mod_bosh.lua Sun Feb 21 06:17:40 2021 +0100 @@ -530,17 +530,15 @@ end end -local GET_response_body = [[ -

It works! Now point your BOSH client to this URL to connect to Prosody.

-

For more information see Prosody: Setting up BOSH.

- ]]; - -local GET_response = { - headers = { - content_type = "text/html"; - }; - body = module:get_option_string("bosh_get_response_body", GET_response_body); -}; +local function GET_response(event) + return module:fire_event("http-message", { + response = event.response; + --- + title = "Prosody BOSH endpoint"; + message = "It works! Now point your BOSH client to this URL to connect to Prosody."; + --

For more information see Prosody: Setting up BOSH.

+ }) or "This is the Prosody BOSH endpoint."; +end module:depends("http"); module:provides("http", {