From 45e055d26a8133358518ba4f2c6676a15b2b1c75 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 15 Apr 2016 11:50:55 +0200 Subject: MUC: Save room to storage once after form processing, not in each individual setter --- plugins/muc/muc.lib.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/muc/muc.lib.lua') 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; -- cgit v1.2.3