aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/mod_muc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r--plugins/muc/mod_muc.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 3f01ee11..5abde57c 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -97,11 +97,12 @@ local function restore_room(jid)
end
end
-function forget_room(jid)
- rooms[jid] = nil;
+function forget_room(room)
+ local room_jid = room.jid;
local node = jid_split(room.jid);
+ rooms[room_jid] = nil;
room_configs:set(node, nil);
- if persistent.get(room_jid) then
+ if persistent.get(room) then
persistent_rooms:set(nil, room_jid, nil);
end
end
@@ -148,8 +149,7 @@ module:hook("muc-room-pre-create", function(event)
end, -1000);
module:hook("muc-room-destroyed",function(event)
- local room = event.room
- forget_room(room.jid)
+ return forget_room(event.room);
end)
do