mod_http_muc_log/mod_http_muc_log.lua
changeset 2595 3e1a85c5194c
parent 2594 63dd3e525f13
child 2596 fb1987d4ac62
equal deleted inserted replaced
2594:63dd3e525f13 2595:3e1a85c5194c
   182 		module:log("warn", "Could not search archive: %s", err or "no error");
   182 		module:log("warn", "Could not search archive: %s", err or "no error");
   183 		return 500;
   183 		return 500;
   184 	end
   184 	end
   185 
   185 
   186 	local first, last;
   186 	local first, last;
   187 	local verb, subject, body;
       
   188 	for key, item, when in iter do
   187 	for key, item, when in iter do
   189 		body = item:get_child_text("body");
   188 		local body = item:get_child_text("body");
   190 		subject = item:get_child_text("subject");
   189 		local subject = item:get_child_text("subject");
   191 		verb = nil;
   190 		local verb = nil;
   192 		if subject then
   191 		if subject then
   193 			verb, body = "set the topic to", subject;
   192 			verb, body = "set the topic to", subject;
   194 		elseif body and body:sub(1,4) == "/me " then
   193 		elseif body and body:sub(1,4) == "/me " then
   195 			verb, body = body:sub(5), nil;
   194 			verb, body = body:sub(5), nil;
   196 		elseif item.name == "presence" then
   195 		elseif item.name == "presence" then