# HG changeset patch # User Waqas Hussain # Date 1276447111 -18000 # Node ID bc07564bec6dce752f648ceb35d5dcab69ea0960 # Parent fae054e15e034ede56734f2fd3394b8e4fc244ef MUC: Added room:set_persistent(boolean) and room:is_persistent(). diff -r fae054e15e03 -r bc07564bec6d plugins/muc/muc.lib.lua --- 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;