# HG changeset patch # User Kim Alvefur # Date 1376161725 -7200 # Node ID b32d65e41755926e36fee0f0bea525555d2cb39b # Parent 5c97ee75cadbd1226d9fd68a98d443c5cc436a34 mod_mam_muc: Get room objects in a less awkward fashion diff -r 5c97ee75cadb -r b32d65e41755 mod_mam_muc/mod_mam_muc.lua --- a/mod_mam_muc/mod_mam_muc.lua Sat Aug 10 21:05:38 2013 +0200 +++ b/mod_mam_muc/mod_mam_muc.lua Sat Aug 10 21:08:45 2013 +0200 @@ -26,6 +26,7 @@ --local rooms_to_archive = module:get_option_set("rooms_to_archive",{}); -- TODO Should be possible to enforce it too +local rooms = hosts[module.host].modules.muc.rooms; local archive_store = "archive2"; -- Handle archive queries @@ -34,7 +35,7 @@ local room = jid_split(stanza.attr.to); local query = stanza.tags[1]; - local room_obj = hosts[module.host].modules.muc.rooms[jid_bare(stanza.attr.to)]; + local room_obj = rooms[room]; if not room_obj then return -- FIXME not found end