plugins/muc/muc.lib.lua
changeset 3258 bc07564bec6d
parent 3257 fae054e15e03
child 3259 a5b9209efb23
--- a/plugins/muc/muc.lib.lua	Sun Jun 13 20:55:07 2010 +0500
+++ b/plugins/muc/muc.lib.lua	Sun Jun 13 21:38:31 2010 +0500
@@ -274,6 +274,16 @@
 function room_mt:is_members_only()
 	return self._data.members_only;
 end
+function room_mt:set_persistent(persistent)
+	persistent = persistent and true or nil;
+	if self._data.persistent ~= persistent then
+		self._data.persistent = persistent;
+		if self.save then self:save(true); end
+	end
+end
+function room_mt:is_persistent()
+	return self._data.persistent;
+end
 
 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
 	local from, to = stanza.attr.from, stanza.attr.to;