# HG changeset patch # User Waqas Hussain # Date 1276448087 -18000 # Node ID fe1c93296abde11fd55f6f6f7a87cbdd2abe16f1 # Parent 19b655a8671c1cd32eadc48b88b37197a17eed2d MUC: Added room:set_hidden(boolean) and room:is_hidden(). diff -r 19b655a8671c -r fe1c93296abd plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Sun Jun 13 21:43:53 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sun Jun 13 21:54:47 2010 +0500 @@ -285,6 +285,16 @@ function room_mt:is_persistent() return self._data.persistent; end +function room_mt:set_hidden(hidden) + hidden = hidden and true or nil; + if self._data.hidden ~= hidden then + self._data.hidden = hidden; + if self.save then self:save(true); end + end +end +function room_mt:is_hidden() + return self._data.hidden; +end function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc local from, to = stanza.attr.from, stanza.attr.to;