MUC: Move the locked flag into persisted data (so not to lose it on eviction)
authorKim Alvefur <zash@zash.se>
Thu, 28 Apr 2016 23:14:09 +0200
changeset 7410 e465b584547b
parent 7409 92755ca737c3
child 7411 cf53081ce767
MUC: Move the locked flag into persisted data (so not to lose it on eviction)
plugins/muc/lock.lib.lua
--- a/plugins/muc/lock.lib.lua	Thu Apr 28 22:03:00 2016 +0200
+++ b/plugins/muc/lock.lib.lua	Thu Apr 28 23:14:09 2016 +0200
@@ -14,14 +14,14 @@
 
 local function lock(room)
 	module:fire_event("muc-room-locked", {room = room;});
-	room.locked = true;
+	room._data.locked = true;
 end
 local function unlock(room)
 	module:fire_event("muc-room-unlocked", {room = room;});
-	room.locked = nil;
+	room._data.locked = nil;
 end
 local function is_locked(room)
-	return not not room.locked;
+	return not not room._data.locked;
 end
 
 if lock_rooms then