aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-06-13 21:54:47 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-06-13 21:54:47 +0500
commit3766587466a76c53265f07bc34223834072adbe0 (patch)
tree6c18301d6b530e6343115864f22e803269c7104e /plugins/muc/muc.lib.lua
parenta06b095da6e308b19d8935f3b0dd1dc8eb1e70f1 (diff)
downloadprosody-3766587466a76c53265f07bc34223834072adbe0.tar.gz
prosody-3766587466a76c53265f07bc34223834072adbe0.zip
MUC: Added room:set_hidden(boolean) and room:is_hidden().
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 67b6dbd7..6e80235b 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -285,6 +285,16 @@ end
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;