diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-09-07 20:39:05 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-09-07 20:39:05 +0500 |
commit | 18d3374dca640aaa3bb223f1a93305dc44de10f4 (patch) | |
tree | 26ec916391c0e781cda155b4b819d316db77b645 | |
parent | 67c6af258e7e4f18eac9aa87ff4c6cd2e34bdae3 (diff) | |
download | prosody-18d3374dca640aaa3bb223f1a93305dc44de10f4.tar.gz prosody-18d3374dca640aaa3bb223f1a93305dc44de10f4.zip |
MUC: Fixed stanza routing for reloaded rooms.
-rw-r--r-- | plugins/muc/mod_muc.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 35a44bd6..c61ac238 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -89,12 +89,13 @@ module.save = function() 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 }; |