changeset 3643:740870196b97

mod_http_stats_stream: Make global to simplify The stats are all global anyways and HTTP modules can now be global.
author Kim Alvefur <zash@zash.se>
date Fri, 09 Aug 2019 19:00:35 +0200
parents 2bbf655431be
children 9980ea72ff91
files mod_conversejs/README.markdown mod_http_stats_stream/README.markdown mod_http_stats_stream/mod_http_stats_stream.lua
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_conversejs/README.markdown	Fri Aug 09 18:59:35 2019 +0200
+++ b/mod_conversejs/README.markdown	Fri Aug 09 19:00:35 2019 +0200
@@ -102,7 +102,7 @@
 To select a specific version of Converse.js, you may override the version:
 
 ``` {.lua}
-conversejs_version = "4.0.1"
+conversejs_version = "5.0.0"
 ```
 
 Note that versions other than the default may not have been tested with this module, and may include incompatible changes.
--- a/mod_http_stats_stream/README.markdown	Fri Aug 09 18:59:35 2019 +0200
+++ b/mod_http_stats_stream/README.markdown	Fri Aug 09 19:00:35 2019 +0200
@@ -34,4 +34,6 @@
 }, false);
 ```
 
+# Compatibility
 
+Prosody \>= 0.11.0
--- a/mod_http_stats_stream/mod_http_stats_stream.lua	Fri Aug 09 18:59:35 2019 +0200
+++ b/mod_http_stats_stream/mod_http_stats_stream.lua	Fri Aug 09 19:00:35 2019 +0200
@@ -1,3 +1,5 @@
+module:set_global();
+
 local statsman = require "core.statsmanager";
 local http = require "net.http.server";
 local json = require "util.json";
@@ -28,7 +30,7 @@
 end
 
 
-module:hook_global("stats-updated", function (event)
+module:hook("stats-updated", function (event)
 	local data = table.concat({
 		"event: stats-updated";
 		"data: "..json.encode(event.changed_stats);