# HG changeset patch # User Waqas Hussain # Date 1252337945 -18000 # Node ID f4c50c75af6fd6940097fb6ed3290aac9ce9d276 # Parent 28e5f6b535a811516cddbc9ff53a843438b9daf7 MUC: Fixed stanza routing for reloaded rooms. diff -r 28e5f6b535a8 -r f4c50c75af6f plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Mon Sep 07 20:38:20 2009 +0500 +++ b/plugins/muc/mod_muc.lua Mon Sep 07 20:39:05 2009 +0500 @@ -89,12 +89,13 @@ end module.restore = function(data) rooms = {}; - for jid, oldroom in pairs(data.rooms) do + for jid, oldroom in pairs(data.rooms or {}) do local room = muc_new_room(jid); room._jid_nick = oldroom._jid_nick; room._occupants = oldroom._occupants; room._data = oldroom._data; room._affiliations = oldroom._affiliations; + room.route_stanza = function(room, stanza) core_post_stanza(component, stanza); end; rooms[jid] = room; end prosody.hosts[module:get_host()].muc = { rooms = rooms };