mod_muc_log_http: Don't return a page on missing rooms.
authorWaqas Hussain <waqas20@gmail.com>
Wed, 25 Jan 2012 04:21:17 +0500
changeset 579 513aa6fed9e9
parent 578 1a575bcbc843
child 580 10a9538f41f1
mod_muc_log_http: Don't return a page on missing rooms.
mod_muc_log_http/muc_log_http/mod_muc_log_http.lua
--- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Wed Jan 25 04:20:08 2012 +0500
+++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Wed Jan 25 04:21:17 2012 +0500
@@ -267,6 +267,10 @@
 	local to = "";
 	local topic = "";
 
+	if not(prosody.hosts[host] and prosody.hosts[host].muc and prosody.hosts[host].muc.rooms[bareRoomJid]) then
+		return;
+	end
+
 	path = path:gsub("/[^/]*$", "");
 	attributes = lfs.attributes(path);
 	do