diff options
author | Kim Alvefur <zash@zash.se> | 2016-04-15 11:50:55 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-04-15 11:50:55 +0200 |
commit | 7ea91caa95e5f1e65a03032559241ec4832203df (patch) | |
tree | 9f885da1a933ab13e2fa3c18bd359e8c240f274b /plugins/muc/muc.lib.lua | |
parent | e05eb9a0d70487b62ebd85686044af7859696799 (diff) | |
download | prosody-7ea91caa95e5f1e65a03032559241ec4832203df.tar.gz prosody-7ea91caa95e5f1e65a03032559241ec4832203df.zip |
MUC: Save room to storage once after form processing, not in each individual setter
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 7ff9bde5..42a0af25 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -782,6 +782,7 @@ function room_mt:handle_admin_query_set_command(origin, stanza) else success, errtype, err = nil, "cancel", "bad-request"; end + room:save(); if not success then origin.send(st.error_reply(stanza, errtype, err)); else @@ -1148,7 +1149,7 @@ function room_mt:set_affiliation(actor, jid, affiliation, reason) end end - if self.save then self:save(); end + self:save(true); module:fire_event("muc-set-affiliation", { room = self; |