Changeset

6334:ba2555e06c7c

plugins/muc/mod_muc: persistent rooms keyval store needs username as nil
author daurnimator <quae@daurnimator.com>
date Thu, 07 Aug 2014 18:03:31 -0400
parents 6333:93b8438fe761
children 6335:eaf6e7986934
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Thu Aug 07 12:35:12 2014 -0400
+++ b/plugins/muc/mod_muc.lua	Thu Aug 07 18:03:31 2014 -0400
@@ -52,7 +52,7 @@
 local function room_save(room, forced)
 	local node = jid_split(room.jid);
 	local is_persistent = persistent.get(room);
-	persistent_rooms:set(room.jid, is_persistent);
+	persistent_rooms:set(nil, room.jid, is_persistent);
 	if is_persistent then
 		local history = room._data.history;
 		room._data.history = nil;
@@ -102,7 +102,7 @@
 	local node = jid_split(room.jid);
 	room_configs:set(node, nil);
 	if persistent.get(room_jid) then
-		persistent_rooms:set(room_jid, nil);
+		persistent_rooms:set(nil, room_jid, nil);
 	end
 end
 
@@ -110,11 +110,11 @@
 	local room = rooms[room_jid];
 	if room == nil then
 		-- Check if in persistent storage
-		if persistent_rooms:get(room_jid) then
+		if persistent_rooms:get(nil, room_jid) then
 			room = restore_room(room_jid);
 			if room == nil then
 				module:log("error", "Missing data for room '%s', removing from persistent room list", room_jid);
-				persistent_rooms:set(room_jid, nil);
+				persistent_rooms:set(nil, room_jid, nil);
 			end
 		end
 	end