aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-02-21 06:17:40 +0100
committerKim Alvefur <zash@zash.se>2021-02-21 06:17:40 +0100
commit5860017b9f13b7849ac62cb532b8f8a6ffb45bea (patch)
tree0b681f04bed55e899f51ccaa667fe6a5fe2a8cc8 /plugins
parentba8610666a7b61259830d534a86c6ef71ef0b609 (diff)
downloadprosody-5860017b9f13b7849ac62cb532b8f8a6ffb45bea.tar.gz
prosody-5860017b9f13b7849ac62cb532b8f8a6ffb45bea.zip
mod_bosh: Use message template from mod_http_error
Looking Good! And most importantly, consistent.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_bosh.lua20
1 files changed, 9 insertions, 11 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 6393a73e..db281fcd 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -530,17 +530,15 @@ function stream_callbacks.error(context, error)
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", {