mod_muc_rtbl: Fix to hook server-started globally, to fetch entries at startup (thanks mirux)
authorMatthew Wild <mwild1@gmail.com>
Mon, 06 Dec 2021 12:02:45 +0000
changeset 4813 9e9ec0f0b128
parent 4812 8a63a0daf129
child 4814 181738ae4117
mod_muc_rtbl: Fix to hook server-started globally, to fetch entries at startup (thanks mirux)
mod_muc_rtbl/mod_muc_rtbl.lua
--- a/mod_muc_rtbl/mod_muc_rtbl.lua	Mon Dec 06 10:36:02 2021 +0000
+++ b/mod_muc_rtbl/mod_muc_rtbl.lua	Mon Dec 06 12:02:45 2021 +0000
@@ -105,5 +105,7 @@
 if prosody.start_time then
 	request_list();
 else
-	module:hook("server-started", request_list);
+	module:hook_global("server-started", function ()
+		request_list();
+	end);
 end