diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 21:38:31 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 21:38:31 +0500 |
commit | be184d293d41517ee194f1472cdcddbf0a070d0c (patch) | |
tree | e64d0d7bab5eb0046ab92f9558d6d8abcd06548f /plugins/muc/muc.lib.lua | |
parent | a65e7c76579f35e405405593bc3e881740f682c9 (diff) | |
download | prosody-be184d293d41517ee194f1472cdcddbf0a070d0c.tar.gz prosody-be184d293d41517ee194f1472cdcddbf0a070d0c.zip |
MUC: Added room:set_persistent(boolean) and room:is_persistent().
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index b1e650b8..74cec635 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -274,6 +274,16 @@ end 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; |