changeset 1575:464ed6bc5a73

mod_http_muc_log: Fix use with old (until 0.10) MUC API
author Kim Alvefur <zash@zash.se>
date Thu, 20 Nov 2014 18:46:53 +0100
parents 7ebec464914e
children 91b91052e0e8
files mod_http_muc_log/mod_http_muc_log.lua
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua	Thu Nov 20 15:38:56 2014 +0100
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Thu Nov 20 18:46:53 2014 +0100
@@ -203,7 +203,10 @@
 	if type(room) == "string" then
 		room = get_room(room);
 	end
-	return room and not room:get_hidden() and not room:get_members_only() and room._data.logging ~= false;
+	return (room
+		and not (room.get_hidden or room.is_hidden)(room)
+		and not (room.get_members_only or room.is_members_only)(room)
+		and room._data.logging ~= false);
 end
 
 -- FIXME Invent some more efficient API for this
@@ -325,7 +328,6 @@
 				room = jid_split(room.jid);
 				name = room:get_name();
 				description = room:get_description();
-				subject = room:get_subject();
 			}, i + 1;
 		end
 	end