Changeset

81:9ceeab822e40

mod_muc_log: revert changes of last commit (bed9a6b40f)
author Thilo Cestonaro <thilo@cestona.ro>
date Sun, 01 Nov 2009 17:22:21 +0100
parents 80:bed9a6b40fae
children 82:608dc38b6580
files mod_muc_log/mod_muc_log.lua
diffstat 1 files changed, 3 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_log/mod_muc_log.lua	Sun Nov 01 16:42:04 2009 +0100
+++ b/mod_muc_log/mod_muc_log.lua	Sun Nov 01 17:22:21 2009 +0100
@@ -13,8 +13,6 @@
 local data_load, data_store, data_getpath = datamanager.load, datamanager.store, datamanager.getpath;
 local datastore = "muc_log";
 local config = {};
-local verifyAuthRequest = module:require "verifyhttpauth".verifyHttpAuthRequest;
-
 
 
 --[[ LuaFileSystem 
@@ -423,7 +421,7 @@
 		return generateDayListSiteContentByRoom(bareRoomJid); -- fallback
 	end
 end
-local requests = {};
+
 function handle_request(method, body, request)
 	local query = splitQuery(request.url.query);
 	local node, host = grepRoomJid(request.url.path);
@@ -439,17 +437,7 @@
 				if room._data ~= nil and room._data.subject ~= nil then
 					subject = room._data.subject;
 				end
-				local doc = createDoc(parseDay(bare, subject, query));
-				local id = "thisIsTheId";
-				requests[id] = request;
-				requests[id].doc = doc;
-				
-				verifyAuthRequest(request.url.path .. "?" .. request.url.query, "thilo@cestona.ro", id, function (id, confirmed)
-					if confirmed and requests[id] then
-						requests[id].send(requests[id].doc);
-					end
-				end)
-				return true;
+				return createDoc(parseDay(bare, subject, query));
 			end
 		else
 			return createDoc(generateRoomListSiteContent());
@@ -460,7 +448,7 @@
 	return;
 end
 
-config = config_get(module:get_host(), "core", "muc_log") or {};
+config = config_get(module:get_host(), "core", "muc_log");
 
 httpserver.new_from_config({ config.http_port or true }, handle_request, { base = "muc_log" });