mod_muc_log_http/muc_log_http/mod_muc_log_http.lua
changeset 184 03cb7511ae54
parent 183 9d4fd01443eb
child 192 12d6316d9eab
equal deleted inserted replaced
183:9d4fd01443eb 184:03cb7511ae54
   690 end
   690 end
   691 
   691 
   692 function handle_request(method, body, request)
   692 function handle_request(method, body, request)
   693 	local node, host, day = splitUrl(request.url.path);
   693 	local node, host, day = splitUrl(request.url.path);
   694 	
   694 	
   695 	if muc_hosts ~= nil then
   695 	if muc_hosts ~= nil and html.doc ~= nil then
   696 	 	if node ~= nil and host ~= nil then
   696 	 	if node ~= nil and host ~= nil then
   697 			local bare = node .. "@" .. host;
   697 			local bare = node .. "@" .. host;
   698 			if prosody.hosts[host] ~= nil and prosody.hosts[host].muc ~= nil then
   698 			if prosody.hosts[host] ~= nil and prosody.hosts[host].muc ~= nil then
   699 				if prosody.hosts[host].muc.rooms[bare] ~= nil then
   699 				if prosody.hosts[host].muc.rooms[bare] ~= nil then
   700 					local room = prosody.hosts[host].muc.rooms[bare];
   700 					local room = prosody.hosts[host].muc.rooms[bare];