diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 20:05:45 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 20:05:45 +0500 |
commit | c31997089ef3b628985e2f475c75ae54c16bd118 (patch) | |
tree | 926aba6524bca5a010159c3833a5e490a5e1ab66 /plugins/muc/muc.lib.lua | |
parent | 169631f6efad436416fceaf9970bb16de4abc7e5 (diff) | |
download | prosody-c31997089ef3b628985e2f475c75ae54c16bd118.tar.gz prosody-c31997089ef3b628985e2f475c75ae54c16bd118.zip |
MUC: Persist data in room:set_password() when called programmatically.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 38e392b5..f265f40c 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -240,8 +240,10 @@ end function room_mt:set_password(password) if password == "" or type(password) ~= "string" then password = nil; end - self._data.password = password; - return password; + if self._data.password ~= password then + self._data.password = password; + if self.save then self:save(true); end + end end function room_mt:get_password() return self._data.password; |