Changeset

579:513aa6fed9e9

mod_muc_log_http: Don't return a page on missing rooms.
author Waqas Hussain <waqas20@gmail.com>
date Wed, 25 Jan 2012 04:21:17 +0500
parents 578:1a575bcbc843
children 580:10a9538f41f1
files mod_muc_log_http/muc_log_http/mod_muc_log_http.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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