Software /
code /
prosody
Changeset
11391:8eff5c744395
mod_bosh: Use message template from mod_http_error
Looking Good!
And most importantly, consistent.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 21 Feb 2021 06:17:40 +0100 |
parents | 11390:226fd5d3a295 |
children | 11392:a76493b75dec |
files | plugins/mod_bosh.lua |
diffstat | 1 files changed, 9 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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 = [[<html><body> - <p>It works! Now point your BOSH client to this URL to connect to Prosody.</p> - <p>For more information see <a href="https://prosody.im/doc/setting_up_bosh">Prosody: Setting up BOSH</a>.</p> - </body></html>]]; - -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."; + -- <p>For more information see <a href="https://prosody.im/doc/setting_up_bosh">Prosody: Setting up BOSH</a>.</p> + }) or "This is the Prosody BOSH endpoint."; +end module:depends("http"); module:provides("http", {