Diff

plugins/muc/muc.lib.lua @ 7353:ca31d3271cf8

MUC: Save room to storage once after form processing, not in each individual setter
author Kim Alvefur <zash@zash.se>
date Fri, 15 Apr 2016 11:50:55 +0200
parent 7352:50b24b3476e6
child 7360:7a37fade5380
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Thu Apr 14 21:23:09 2016 +0200
+++ b/plugins/muc/muc.lib.lua	Fri Apr 15 11:50:55 2016 +0200
@@ -782,6 +782,7 @@
 	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 @@
 		end
 	end
 
-	if self.save then self:save(); end
+	self:save(true);
 
 	module:fire_event("muc-set-affiliation", {
 		room = self;