Changeset

8658:75c7e887c4b9

MUC: Only fetch stored room state if room config is loaded without error
author Kim Alvefur <zash@zash.se>
date Fri, 16 Mar 2018 21:59:34 +0100
parents 8657:a804f2e75f10
children 8659:4006755c1097
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Wed Mar 07 17:38:01 2018 +0100
+++ b/plugins/muc/mod_muc.lua	Fri Mar 16 21:59:34 2018 +0100
@@ -156,9 +156,9 @@
 local function restore_room(jid)
 	local node = jid_split(jid);
 	local data, err = room_configs:get(node);
-	local state = room_state:get(node);
 	if data then
 		module:log("debug", "Restoring room %s from storage", jid);
+		local state = room_state:get(node);
 		local room = muclib.restore_room(data, state);
 		return track_room(room);
 	elseif err then