mod_muc_log_http: Fixed a traceback on rooms with no subject.
authorWaqas Hussain <waqas20@gmail.com>
Sun, 04 Jul 2010 23:38:54 +0500
changeset 192 12d6316d9eab
parent 191 fa7165dd82ee
child 193 18a0e5c0bb62
mod_muc_log_http: Fixed a traceback on rooms with no subject.
mod_muc_log_http/muc_log_http/mod_muc_log_http.lua
--- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Thu Jul 01 00:52:45 2010 +0500
+++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Sun Jul 04 23:38:54 2010 +0500
@@ -341,7 +341,7 @@
 		local first = 1;
 		local alreadyDoneYears = {};
 		local temptime = {day=0, month=0, year=0};
-		topic = room._data.subject
+		topic = room._data.subject or "(no subject)"
 		if topic:len() > 60 then
 			topic = topic:sub(1, topic:find(" ", 50)) .. " ..."
 		end