Software /
code /
prosody-modules
Diff
mod_mam_muc/mod_mam_muc.lua @ 1139:b32d65e41755
mod_mam_muc: Get room objects in a less awkward fashion
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 Aug 2013 21:08:45 +0200 |
parent | 1138:5c97ee75cadb |
child | 1140:402cb9b604eb |
line wrap: on
line diff
--- 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