comparison mod_muc_log_http/muc_log_http/mod_muc_log_http.lua @ 184:03cb7511ae54

mod_muc_log_http: ensure a theme was loaded when handling a http request
author Thilo Cestonaro <thilo@cestona.ro>
date Tue, 22 Jun 2010 11:00:26 +0200
parents 9d4fd01443eb
children 12d6316d9eab
comparison
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];